According to the Islamic tradition, God has created us so that we may worship and draw near to Him. A fundamental principle concerning this is that we must detach ourselves from the ephemeral nature of the world. Known as dunya , meaning low or lowly, the ephemeral world is the place of limitations, suffering, loss, desires, ego, excessiveness and evil. Suffering shows us how truly low the dunya is, thereby facilitating our detachment from it. Thus we are able to draw closer to God.
The Prophet Muhammad, may God’s peace and blessings be upon him, was reported to have said, "Love of the dunya is the root of all evil."  The greatest evil according to Islam is denying and associating partners with God; therefore detachment from the dunya is necessary to reach the ultimate spiritual goal of nearness to God, and subsequently paradise.
The Quran makes it very clear that the dunya is ephemeral and a deceiving enjoyment: "Know that the life of this dunya is but amusement and diversion and adornment and boasting to one another and competition in increase of wealth and children—like the example of a rain whose [resulting] plant growth pleases the tillers; then it dries and you see it turned yellow; then it becomes [scattered] debris." (Qur’an 57:20)
The concept of the dunya should not be confused with the positive aspects of creation, known in Arabic as ‘ alam and khlaq . These concepts relate to the beauty and wonder of what God has created. They are intended to encourage people to reflect and understand which serve as a means to conclude that there is a Divine power, mercy and wisdom behind them.
Suffering of innocent people is temporary
Even if there is a lot of greater good to be actualised, one may observe that some people still suffer without experiencing any relief. This is why in Islam, God not only provides justifications for evil and suffering in this world but also recompenses them. At the end, all believers who suffered and were innocent will be granted eternal bliss, and all the suffering they had—even if they suffered all of their life—will be forgotten forever. The Prophet Muhammad, may God’s peace and blessings be upon him, said:
"… the person who had suffered the most affliction in the world of those destined for Paradise will be brought forth and merely dipped into Paradise for a moment. Then he will be asked ‘O son of Adam, have you ever seen suffering? Have you ever experienced hardship in your life?’ He will reply ‘No my Lord, by God. I have never undergone suffering. I have never seen hardship.’" 
Under atheism, evil has no purpose. It is one of the blind forces in the world that indiscriminately chooses its prey. Those who are victims of suffering and evil have no emotional and rational perspectives to help alleviate their suffering or put their experiences into context. Someone could have suffered all their lives and just ended up in the grave. All of their suffering, sacrifice and pain would have absolutely no meaning whatsoever. Evil is viewed to occur due to prior physical processes, and those who experience evil have no recourse. They cannot attribute any type of will to it, whether human or Divine, because everything is just reduced to blind, random and non-rational physical occurrences. Thus, the logical implications of atheism are quite depressing.
The Islamic tradition has a fountain of concepts, principles and ideas that facilitate the believer’s journey in life. The Prophet Muhammad, may God’s peace and blessings be upon him, empowered the believers with hope and patience. All of the suffering that we face is a means of spiritual purification, thereby facilitating paradise in which we will forget every suffering that we ever experienced:
"No calamity befalls a Muslim but that God expiates some of his sins because of it, even though it were the prick he receives from a thorn." 
"Amazing is the affair of the believer, verily all of his affair is good, and this is for no one except the believer. If something of good/happiness befalls him he is grateful and that is good for him. If something of harm befalls him he is patient and that is good for him." 
Even natural disasters and fatal illnesses are seen through the eyes of hope, mercy and forgiveness. The Islamic perspective on illness is that it is a form of purification, which facilitates eternal bliss in paradise for the sick. The Prophet Muhammad, may God’s peace and blessings be upon him, encouraged visiting the sick: "Feed the hungry, visit the sick, and free the captives."  Those who take care of the sick are rewarded with mercy and forgiveness, and ultimately paradise. There are many Prophetic traditions that elaborate on these points. For example, the Prophet Muhammad, may God’s peace and blessings be upon him, said that if a believer dies of the plague or a stomach illness, they are considered as a martyr, and all martyrs  go to paradise.  There are inspiring traditions of mercy, reward and blessings for those who visit and care for the sick; the Prophet Muhammad, may God’s peace and blessings be upon him, said that whoever visits a sick person "is plunging into mercy until he sits down, and when he sits down he is submerged in it."  A moving and powerful narration from the Prophet Muhammad, may God’s peace and blessings be upon him, teaches us that those who visit the sick will find God with them:
"Verily, God, the Exalted and Glorious, will say on the Day of Judgement: ‘O Son of Adam! I fell ill, but you did not visit Me.’ The human will ask, ‘O my Sustainer! How could I visit You when You are the Sustainer of the Worlds? And how can You fall sick?’ He, the Almighty, will say, ‘Did you not know that such and such a servant of Mine was sick. But you did not visit him. Did you not know that, had you visited him, you would have found Me by his side?’" 
Even in the case of natural disasters like tsunamis, the believing victims would be considered people of paradise because death by drowning is considered martyrdom in the Islamic tradition. The Prophet Muhammad, may God’s peace and blessings be upon him, said in this regard, "Anyone who drowns is a martyr."  Islamic scholars conclude that if a believer died as a result of being crushed by a building during an earthquake (some even extend this to a plane or a car crash), then they are considered people of paradise. The Prophet Muhammad, may God’s peace and blessings be upon him, said that one of the martyrs includes "the one who died in a collapsed (building)". 
But God could create a world without suffering
Notwithstanding the discussion so far, a key objection that usually follows is "but God could create a world without suffering". This contention is just a repackaging of the original argument; in other words, why has God allowed evil and suffering to exist? Therefore, the same answer applies; Divine wisdom. The one who makes this objection does so because they cannot understand why there is evil and suffering in the first place, and they believe that a merciful and powerful God should prevent every evil and suffering. Nevertheless, this has already been addressed in this essay.
The ‘problem’ of evil and suffering is not a problem for the believer, as evil and suffering are understood as functions of God’s profound wisdom, perfection and goodness. The spiritual teachings of Islam create a sense of hope, patience and tranquillity. The logical implications of atheism is that one is plunged into a hopeless state and does not have any answers to why evil and suffering exist. This ignorance is mostly due to an egocentrism that makes them fail in their ability to see things from another perspective, just as I was when I thought my parents were malicious when they prevented me from drinking my grandfather’s whisky.