The purpose of creation is a topic that puzzles every human being at some point of his or her lifetime. Although most people put the question of why we are created aside after occasional brief reflection, it is extremely critical for human beings to know the answer.
1) God created in order to manifest His attributes. Consequently,
Creation is the consequence of His being the Creator
Paradise manifests His Mercy and Grace
Hell, His justice etc
2) However, it is of even greater importance that human beings know the purpose for which they were created.The final revelation teaches that it is to worship God because humankind must worship Him in order to attain righteousness and the spiritual status necessary to enter paradise. The significance of this knowledge is that human beings understand that worship is as much a necessity as eating and breathing and that it is not a favour they are doing for God. "I have created the jinn and humankind only for My worship" The Holy Qur'an, Chapter 51, Verse 56
3) "[It is He] who created death and life to test which of you is best in conduct; and He is the Mighty, the Forgiving" The Holy Qur'an, Chapter 67, Verse 2
Thus, the purpose for the creation of human beings in this world is to test their conduct. This world of life and death, wealth and poverty, sickness and health, was created to sift out the righteous souls from the evil souls. The tests serve to confirm on the Day of Judgment that those going to hell deserve it and those going to paradise only got there by God's grace.