All perfect praise be to Allaah, The Lord of the worlds. I testify that there is none worthy of worship except Him, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
Allaah The Almighty has created the worldly life for a certain wisdom that he mentioned in the Quran; He Says (what means):
{[He] who created death and life to test you [as to] which of you is best in deed; and He is the Exalted in Might, the Forgiving.} [Quran 67:2]
This life is a place, wherein Allaah The Almighty tries His servants, by sending them Messengers and Scriptures; those that believe in them and abide by what is in the books will be among the dwellers of Paradise, while those who disbelieve will be among the inhabitants of Hell.
The Prophet, sallallaahu ‘alayhi wa sallam, was asked about people’s deeds, whether they were predetermined or new acts on their part; he replied that they have already been predestined. He was then asked about the reason for doing anything, so he, sallallaahu ‘alayhi wa sallam, ordered them to keep doing [good] deeds, because Allaah The Almighty will facilitate for everyone the very actions they are meant to do, as He Says (what means):
{Indeed, your efforts are diverse. As for he who gives and fears Allaah. And believes in the best [reward], We will ease him toward ease. But as for he who withholds and considers himself free of need, and denies the best [reward], We will ease him toward difficulty.} [Quran 92:4-10]
Thus, every person should do good, search for a means of guidance and supplicate to Allaah The Almighty for help in adherence to the religion.
The believers should know that Allaah the Almighty has created people, with full knowledge of their provision, life span and actions. We find that most people inquire about [the need for deeds that result in eternal] bliss and wretchedness, but not about [the need for working for] sustenance [which they do anyway], while both are similarly hidden to the creation, but exist in prior Divine knowledge. Indeed, we must trust the wisdom and justice of Allaah The Almighty and be certain that he does not punish anyone undeservingly and is Oft-Forgiving.
The rule is that a person should submit to the will of Allaah The Almighty in every matter, whether the mind is capable of comprehending it or not. Moreover, we should believe that any deficiency lies in us, not in His wisdom; He Says (what means): {He is not questioned about what He does, but they will be questioned.} [Quran 21:23]
Allaah Knows best.