It is also sometimes seen that infidels and sinners die easily. It is so because they had some good deeds in his life. His soul departs comfortably so that this account may be cleared in this world (he never believed in the post-mortem accounting). So he gets the reward here instead of the Hereafter. For example, a man spent his money for some good cause or helped a poor oppressed person. As a reward of this good deed he is given ease at death so that he may get the reward of this good deed in this very world and may have no claim in the Hereafter. The same is regarding the trouble faced by a believer at death time, which makes him, clean from the impurities of the sins of his lifetime. Anyway the fact of the matter is that, for an unbeliever, death is the beginning of his misfortune, be it comfortable or painful. For a faithful both pain as well as ease is the start of bounties and comforts of everlasting nature. So the deathbed condition indicates no fixed rule.
source : http://www.maaref-foundation.com