Benefiting the Deceased (Hadith No. 1169)


Bismillah.
Narrated Aisha:
A man said to the Prophet (p.b.u.h), "My mother died suddenly and I thought that if she had lived she would have given alms. So, if I give alms now on her behalf, will she get the reward?" The Prophet replied in the affirmative.
Benefits of du`a, charity and Hajj reach the deceased, according to the consensus of scholars.

Du`a

With regard to du’aa’ and praying for forgiveness, Allaah says (interpretation of the meaning):
“And those who came after them say: ‘Our Lord! Forgive us and our brethren who have preceded us in Faith"
[al-Hashr 59:10] 
The Prophet (peace and blessings of Allaah be upon him) said:
“Pray for forgiveness for your brother and ask that he be made steadfast, for now he is being questioned.” 
And he (peace and blessings of Allaah be upon him) said:
“When you offer the (funeral) prayer for the deceased, then make du’aa’ sincerely for him.”

Charity

With regard to charity, it was narrated in al-Saheehayn from ‘Aa’ishah that a man said to the Prophet (peace and blessings of Allaah be upon him): “My mother died suddenly and she did not leave a will, but I think that if she could have spoken she would have given in charity. Will she have a reward if I give in charity on her behalf?” The Prophet (peace and blessings of Allaah be upon him) said: “Yes.” Narrated by al-Bukhaari, no. 1388; Muslim, no. 1004.  
And it was narrated by al-Bukhaari from Sa’d ibn ‘Ubaadah that his mother died when he was absent, and he said: “O Messenger of Allaah, my mother has died when I was absent. Will it benefit her if I give in charity on her behalf?” He said: “Yes.” He said: “I ask you to bear witness that my garden that bears fruit is given in charity on her behalf.” Narrated by al-Bukhaari, 2756.

Hajj

With regard to Hajj, the Prophet (peace and blessings of Allaah be upon him) said to one who asked him about Hajj: “Don’t you think that if your mother had a debt, you would pay it off for her?” She said: “Yes.” He said: “A debt owed to Allaah is more deserving of being paid off.” Narrated by al-Bukhaari, 6699; Muslim, 1148.
More on this subject here.
Wassalam.