Imam Al-Nawawi’s Riyad-us-Saliheen
Charity on behalf of the Deceased and Praying for him
Allah, the Exalted, says:
“And those who came after them say: `Our Rubb! Forgive us and our brothers who have preceded us in Faith.”’ (59:10)
948. `Aishah (May Allah be pleased with her) reported: A man said to the Prophet (sallallaahu alayhi wa sallam): “My mother has died suddenly. I think that if she were able to talk (alive) she would have given in Sadaqah (charity). So, if I give Sadaqah now on her behalf, will she get the reward?” The Messenger of Allah (sallallaahu alayhi wa sallam) said, “Yes (she will be rewarded for that).”
[Al-Bukhari and Muslim].
949. Abu Hurairah (May Allah be pleased with him) reported: The Messenger of Allah (sallallaahu alayhi wa sallam) said, “When a man dies, his deeds come to an end, except for three: A continuous charity, knowledge by which people derive benefit, pious son who prays for him.”