Allah The Most High says, "O Mankind! Worship your Lord (Allah), Who created you and those before you so that you bay become Al-Muttaqoon (i.e. those who have taqwaa)." Al-Baqarah (2):21
And He said, "And I created not the Jinns and men except that they may worship Me (Alone)." Adh-Dhaariyaat (51):56
Allah Ta`aalaa also says in the Qur'aan: "Blessed be He in Whose Hand is the dominion, and He is able to do all things. Who has created death and life, that He may test which of you is best in deed. And He is the All-Mighty, the Oft-Forgiving." Al-Mulk (67):1-2
These verses where revealed to us by Allah in order to inform us of why we are here on the Earth, what we should be doing and where we are heading. Not to benefit Himself, or because He needs our worship. Rather, because we are in need of Him.
Allah Ta`aalaa says, "O mankind! It is you who stand in need (who are poor) of Allah, but Allah is Rich (Free of all needs), Worthy of all praise." Faatir (35):15
What is meant by "to test which of you is best in deed"? Al-Fudayl Ibn `Iyyaad said, "The best deed is that which is most devoted and most proper." He was asked, "How should it be most devoted and most proper?", and he responded, "For if the deed was devoted but was not proper it would not be accepted, and if it was proper but was not devoted it would not be accepted; the devoted is to be for Allah alone, and the proper is to be in compliance with As-Sunnah."
We were created for this one reason: to worship Allah and to strive to be the best in deed. It is not only a matter of how many deeds we do, it is also a matter of quality. Should we take for granted that our deeds are accepted or should we strive to perfect them and make them pure for Allah's sake and in accordance to the Sunnah of the Prophet (peace be upon him)?
Allah Ta`aalaa says in the Qur'aan: "Say (O Muhammad): "Shall We tell you the greatest losers in respect of (their) deeds? Those whose efforts have been wasted in this life while they thought that they were acquiring good by their deeds?" al-Kahf (18):103-104
And He said, "Verily, Allah accepts only from those who are al-Muttaqoon (i.e. those who have taqwaa)." Al-Maa'idah (5):27
A scholar said, "there are those who think that this Universe has founded itself or it came to exist by co-incidence. This necessitates that man "has no goal to fulfill" because he came into being without a defined goal! Consequently, a moral or a value system becomes meaningless. Accordingly, man is just a responding "tool" for "mother nature" which, according to Darwin himself, "acts haphazardly"! This way of thinking is aimlessness, and it occurs when man does not recognize his relation with the One who had created life and death, the Universe, and everything around man, all in due proportion."
We have to remember that Allah created death and life so that we may worship Him (i.e. obey Allah Ta`aalaa in all which He commands through the tongue of the Messengers, performing all that Allah loves and is Pleased with from statements and actions - both inner and outer), and perform that worship in the best manner. That is what our objective should be. Instead of contradicting the purpose of man's existence and acting for the sake of perishable worldly interests, we must fulfill its completion. This worship includes all our acts, our sleep, our studies, our recreation and specific forms of worship defined by the Qur’aan and Sunnah. Our period here is short and being slave to worldly gains results in corruption of our souls, constant difficulty, worry and poverty.
The Prophet (peace be upon him) said, "Allah says: Son of Adam: fill your time with My worship and I will fill your heart with richness, and end off your poverty. But if you do not, I would make your hands fully busy (i.e. in worldly affairs) and I would not end off your poverty." (At-Tirmidhee, hasan hadeeth)
Moreover, Allah has given us choice and has not forced us to do our acts. He says, "Then whosoever wills let him believe, and whosoever wills let him disbelieve." al-Kahf (18):29
Clearly, we have been informed of our purpose and were shown the way to achieve it. The choice is ours.