Prayers for the Deceased
The prayers of other Muslims on behalf of the dead will benefit the dead, by the permission of God. Had they done no good, no one would consider praying for them. If they were evil, the prayers of others will not benefit them. Allah praises the believers who pray for those who have passed away before their time:
""And those who came after them say: Our Lord, forgive us and our brothers who preceded us in faith, and do not put in our hearts any hatred against the believers. Our Lord, You are indeed full of kindness, Most Merciful."
The funeral prayer itself consists mostly of prayers for the dead:
Safwan [the narrator mentioned that Safwan ibn 'Abdillah ibn Safwan was married to ad-Darda] said, "I visited Abud-Darda's home in Syria, but did not find him there. Ummud-Darda asked [me], 'Are you going to make Hajj this year?' I said: 'Yes.' She said, 'Pray to Allah for good for us, for Prophet Muhammad ﷺ, upon whom be peace, said:
"The prayer of Muslim for his Muslim brother in his absence will be answered. As long as he prays for the good of his brother, there is an angel assigned near his head who says: Amen, and may the same be for you." '
I left and went to the marketplace where I met Abud-Darda and he related from Prophet Muhammad ﷺ the same as that."
Sahih Muslim, vol.4, p.1429, no.6590
Fasts missed by dead persons may be done on their behalf by their close relatives. The fasts may be from Ramadhan or from oaths (nathar).
'A'ishah quoted Prophet Muhammad ﷺ, peace be upon him, as saying:
"Whoever died owing fasts, his guardian should fast on his behalf."
Sahih al-Bukhari, vol. 3, p.99, no.173, and Sahih Muslim, vol. 2, p.556, no. 2553
"A man came to Prophet Muhammad ﷺ and asked: OProphet Muhammad ﷺ , my mother died owing one month of fasting. Should I do it for her? He replied:
"Yes, debts to Allah, have more right to be paid."
Sahih al-Bukhari, vol. 3, p. 99, no. 174, and Sahih Muslim, vol. 2, p. 556, no. 2554, Narrated by Ibn 'Abbas
In another narration a woman asked about her mother's debt of fasting and got the same reply. [Sahih Muslim, vol. 2, pp. 556-7, nos. 2554, 2557-61]
Paying financial debts
Anyone may cover the debts of a dead person, whether they are relatives or not. Furthermore, the payment of outstanding debts can benefit the dead by relieving them from some of the punishment due to them for their negligence in repaying them.
"A man died and they washed him, perfumed him and shrouded him. Then he was brought to Prophet Muhammad ﷺ, peace be upon him, to lead the funeral prayer for him. They asked, "Could you pray for him?" He took a step forward then asked:
"Does he have any outstanding debts?"
It was answered: "Two dinar."
"Make the funeral prayer for your companion," and began to leave.
Abu Qatadah took responsibility for [paying] the debt, saying, "The two dinar are my responsibility." Prophet Muhammad ﷺ, peace be upon him, asked:
"Will the creditor be taken care of and will the dead person be absolved from them?"
He replied, "Yes," so Prophet Muhammad ﷺ, upon whom be peace, led the funeral prayer for him. A day later he asked Abu Qatadah:
"What was done about the two dinar?"
He replied, "He only died yesterday!" The following day he returned to Prophet Muhammad ﷺ and said, "I have paid them off." Prophet Muhammad ﷺ , peace be upon him, said:
"Now his skin has become cool."
Musnad Ahmad, vol.3, p.330; authenticated in Ahkaamul-Janaa'iz, p. 16, Narrated by Jabir
The charity of children
Parents will benefit from whatever righteous deeds their children do, without decreasing the reward of their children's good deeds. A righteous child is considered to be part of the parent's earnings.
'Umarah ibn 'Umayr's aunt asked 'A'ishah, "I have an orphan under my guardianship. May I consume some of his wealth?" She replied that she had heard Prophet Muhammad ﷺ, peace be upon him, say:
"Among the most pleasant things a man consumes is what comes from his own earnings, and his child is from his earnings."
Sunan Abu Dawud, vol. 2, p. 1002, no.3521; authenticated in Sahih Sunan Abi Dawud, vol. 2, p. 674, no. 3013
'A'ishah related that a man asked Prophet Muhammad ﷺ, "My mother died suddenly, and I think that if she had spoken [before dying], she would have given something in charity. If I give charity on her behalf, will she get the reward?" Prophet Muhammad ﷺ replied, "Yes."
Sahih al-Bukhari, vol. 2, p.266, no.470, Sahih Muslim, vol. 3, p.866, no.4002, and Sunan Abu Dawud, vol. 2., p.812, no.2875
Prophet Muhammad ﷺ , upon whom be peace, as saying:
"When a man dies, his acts come to an end, except in three cases: an ongoing charity, knowledge from which people continue to benefit, and a righteous child who prays for him."
Sahih Muslim, vol. 3, p.867, no. 4005, and Sunan Abu Dawud, vol. 2, p.812, no.2874, Narrated by Abu Huraira