There are many things to be done that could benefit the dead such as asking Allah’s forgiveness for them, fulfilling their obligation, maintaining some charitable things that they used to do.
In this regard, Dr. Ahmad Sa`eed Hawwa, professor of Islamic Jurisprudence, at Jordan University, issued the following Fatwa: “The Prophet (peace and blessings be upon him) is reported to have said, “When a person dies, all his deeds come to an end except three: ongoing charity, beneficial knowledge (which he has left behind), or a righteous child who will pray for him. ”
In addition to the aforementioned acts, there are other deeds from which a dead person can derive posthumous benefits. They are represented in continuous supplication from his relatives to him, giving voluntary charity on his behalf, reciting the Qur’an on his behalf, and other righteous deeds done for the purpose of catering for others’ welfare.
elaborating on the acts that can benefit the dead, Sheikh M. S. Al-Munajjid, a prominent Saudi Muslim lecturer and author, states:
“Islam has explained what actions on the part of the living may benefit the dead, and what may reach them in their graves. The Prophet (peace and blessings be upon him) said: “When a person dies, all his deeds come to an end except three: ongoing charity, beneficial knowledge (which he has left behind), or a righteous child who will pray for him.” (Reported by at-Tirmidhi with a good chain of transmission)
the most important thing that will benefit the deceased is to strive to pray for him/her and ask for forgiveness and mercy for him, and forParadise and salvation from the Fire, and other good and beautiful du`a’s (supplications). Prayers for forgiveness offered by both sons and daughters of the deceased bring great benefits, as the Prophet (peace and blessings be upon him) said: “A man’s status will be raised in Paradise and he will ask, ‘How did I get here?’ He will be told, ‘By your son’s du`a’s (prayers) for forgiveness for you.” (Reported by Ibn Majah)
Another thing that may reach the deceased is sadaqah (charity) given on his behalf, because ‘Aa’ishah (may Allah be pleased with her) reported that a man said to the Prophet (peace and blessings be upon him): “My mother has passed away, and if she could have spoken, she would have given something in charity. Will she receive a reward if I give something on her behalf?” He said, “Yes.” (Reported by al-Bukhari)
Other deeds that may also benefit the deceased are Hajj and `Umrah on their behalf, after the living person has first performed Hajj and `Umrah on his or her own behalf. ‘Abdullah ibn Buraydah reported that his father (may Allah be pleased with him) said: “While I was sitting with the Messenger of Allah (peace and blessings be upon him), a woman came to him and said: ‘I gave my mother a slave-woman in charity, and now my mother has died.’ He said: ‘You have got your reward, and your right of inheritance has brought your gift back to you.’ She said, ‘O Messenger of Allah, she still had one month to fast – can I fast it on her behalf?’ He said, ‘Fast it on her behalf.’ She said, ‘She never went to Hajj – can I perform Hajj on her behalf?’ He said, ‘Perform Hajj on her behalf.’” Reported by Muslim.
This shows that it is also permissible to fast on behalf of the deceased. another thing that may benefit the deceased is to fulfill their nadhr (vow), because Ibn ‘Abbas (may Allah be pleased with him and his father) reported that a woman came to the Prophet (peace and blessings be upon him) and said: “My mother made a vow to perform Hajj but she died before she could do it. Can I perform Hajj on her behalf?” He said, “Yes, perform Hajj on her behalf. Don’t you think that if your mother owed a debt you would pay it off?” She said, “Yes.” He said, “Then pay off what is owed to Allah, for Allah is more deserving of having vows fulfilled.” (Reported by al-Bukhari)
Another thing that may benefit the deceased is if his relative devotes a share to him of a sacrifice he offers. When the Prophet (peace and blessings be upon him) offered a sacrifice, he said: “In the name of Allah, O Allah, on behalf of Muhammad and the family of Muhammad.” (Reported by Muslim) The family of Muhammad included both the living and the dead.”