A great question can arise into the mind of a believer that why are some unbelievers going to be punished forever in hellfire when they were not disobedient in their lives for too long. And why will some believers go to heaven when they while they were only obedient to Allah for a short time in their life?
This daunting question has a clear answer in Islam. The difference between punishment and reward is the intention of human beings. Therefore the actions depends on intentions, the unbelievers had the intention to dispbey Allah forever, while the believers had the intention to obey Allah forever even if they failed to obey him all teh time and fallen into temptation of sins. But due to repentance, Allah forgave their sins and will enter them into heaven.
Therefore it is proved that entering paradise is strictly due to the faith of a Muslim. The paradise is divided into various levels according to the deeds. The levels of hell are also due to the level of disobedience and dying repentless. For example a disbeliever can do good deeds in his life like charity and going to mosque on Friday, but the charity will not save him due to not being done for the sake of pleasing Allah.
No matter how humanitarian unbelievers are, they do everything to please their own egos. Therefore they do not deserve the rewards of Allah. Being a Muslim means to submit to Allah for his will. According to Qur’an,
“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 they were acquiring good by their deeds? Those are they who deny the signs of their Lord and the meeting with Him [in the Hereafter]. So their works are in vain, and on the Day of Resurrection, We shall not give them any weight. That shall be their recompense – Hell, because they disbelieved and took My signs and My Messengers by way of jest and mockery.” (al-Kahf, 18/103-106)
However, Allah may reward them for their deeds in this world. Allah has stated, as was mentioned earlier,
“Whosever desires the life of this world and its glitter, to them We shall pay in full (the wages of) their deeds they did therein, and they will have no diminution therein. They are those for whom there is nothing in the Hereafter but Fire; and vain are the deeds they did therein. And of no effect is that which they used to do.” (Hood, 11/15-16)
Source: missionislam.com/knowledge/intentionkey.htm