There will be difficulties for every person in this time of transition from this world to hereafter, and that is why we should be eager to be prepared for this journey by doing good deeds.
AT THE TIME OF DEATH – While the person dying or at the time of transition to next life.
– The Prophet ( r ) said: “Prompt your dying ones to say, ‘There is no one worthy of worship except Allah ( (laa ilaaha illallaah).” [Muslim] – at the time of transition to next life.
– And also: “Read ‘Surah Yaaseen’ over your dead.” [An-Nasaa’i, Abu Dawud] – Surah Yaseen got many lessons pertaining to reality of people and as well as about hereafter. Over dead means recited during/at the time of transition or while person dying. And not at all intend that it to be recited over a dead person. (Additional note: As regards reading Soorat Yaa-Seen for one who has died, there is no saheeh hadeeth to indicate that this should be done. A hadeeth was narrated by Abu Dawood and others which says “Read Yaa-Seen over your dead”, but this hadeeth is not saheeh because its isnaad contains contradictions and narrators who are unknown (majhool). This was stated by al-‘Allaamah al-Albaani in Irwaa’ al-Ghaleel, hadeeth no. 688. Reading Qur’aan over the dead is considered to be bid’ah (innovation), as he states at the end of his book Ahkaam al-Janaa’iz. Please refer http://islamqa.com/en/ref/734)
Allah Knows Best.
The funeral rites in Islam are easy and very simple procedures, avoid extravagance. This is what the shairah intent, the shariah has prevented us from being extravagance in respect to funeral rites and also prevents us from Mass gathering around the house of the dead.
– To prepare the dead (for burial) by washing him, shrouding him, praying Salaah over him, carrying him to his burial place and burying him is a Fardh Kifayah (collective obligation)- If some people do it, the obligation is lifted on the rest of the society.
 The Prophet (r) said: “Hasten with the bier for if is the deceased was righteous, then you would be expediting it to the goodness that awaits, and if he was otherwise, then you would be ridding yourselves of an evil burden.” [al-Bukhari]
It is obligatory when shrouding to use a cloth that will cover the entire body, except for the head of the Muhrim (the male person in the state of Ihram) and the face of the Muhrimah (the female person in the state of Ihram).
– Debt should be settled immediately by nearest family.
And also: “The believers soul is suspended due to debt until it is cleared for him.” [Ahmad, at-Tirmdhi]
The dead person is responsible for his debt even after his death, it is important for everyone to pay off his debts immediately. It is also important for the relatives to pay off the debt as Prophet never used to pray upon the one who had debt.
How to perform the Salaah over the deceased?
– This Salah is Fard Khifayah, therefore the person who is rendering it should stand. The description of the Salaah over the deceased is as follows:
 – To stand and make the Takbeer and recite Surah al- Faatihah.
 – Then to make another Takbeer and send peace and blessings upon the Prophet sallahuwalayhi wa sallam – “O Allah, shower blessings upon Muhammad and the family of Muhammad as you showered blessings upon the family of Ibrahim. You are the Praiseworthy and Glorious And grant favours to Muhammad and to the family of Muhammad as you granted favours the family of Ibrahim. You are the Praiseworthy and Glorious.”
( Allaahumma salli ‘ala Muhammadin wa ‘ala aali Muhammaddin, kama salayta ‘ala aali Ibraaheem, innaka Hameedun Majeed. Allaahumma baarik ‘ala Muhammadin wa ‘ala aali Muhammadin, kama baarakta ‘ala aali Ibraaheem, innaka Hameedum Majeed. ) .
 – Then to make another Takbeer and supplicate for the deceased. You may use any of the supplications in your book. Shaikh makes it clear that these supplications can be in any language and you don’t need to make any particular supplication. You can make any supplication that is easy for you and you can complete the salaah.
 – Then, one makes another Takbeer and then a Tasleem (to complete the prayer).
a) In our Shariah, it is recommended to perform this Salah in large numbers. It is recommended that large number attend the salaah because there will be more people to console the family, more supplications will be performed for the one passed away.
Great reward for the one who performs the Salah. The Prophet ( r ) said: “Whenever a Muslim dies, and forty men pray over his janaazah, none of them joining anything with Allah in worship, Allah grants them intercession for him” [Muslim]
And also: “Whoever attends the funeral until the Salah is prayed (over the deceased), will have aQirat worth of reward, and whoever attends (and stays) until till he is buried, for him is the reward of two qirats.” It was asked: “What are two qirats?” He (s) replied: “They are equivalent to two immense mountains.” [Agreed Upon]
b) Console the family
It is recommended to console the relatives of the deceased. There is lot of reward for doing such act.
C) It is encouraged to visit the graveyard and make dua for the dead.
It reminds us the hereafter; we understand that our end will be also the same in our grave one day.
If we look at the goals of visiting the grave, it is not permissible to go to graveyard and supplicate for oneself; it’s a bidah – innovation and thus going against the Sunnah of the Prophet sallahu wa alayhi wa sallam.
If one who calls on the dead person on the grave, it’s an act of shirk.
“eg: O so and so (individual) please provide me sustenance” is a clear cut act of shirk(associating partners with Allah)
Allah commands to ask Him alone and do not supplicate to anyone else. (Sheikh recited two verses that is posted below under sub heading – Forbidden acts)
The one visiting the grave should say the salaam and dua for the dead:
“Peace be upon you all, O inhabitants of the abodes of the believers. Indeed we will, Allah willing, be joining you. May Allah have mercy upon those who went before us and those coming after; We ask Allah for wellbeing for us and for you. O Allah, do not deny us from their reward and do not put us to trial after them and forgive us and them. We ask Allah wellbeing for us and for you.”
( Assalaamu ‘alaykum ahla qawni daari mu’mineen, wa innaa – in shaa allahu – bikum laahiqoon; wa yarhamuhullaahu almustaqdimeen wa’l musta’khireen; nas’alulaaha lana wa lakum al-‘aafiyah. Allaahumma laa tahrimna ajrahum wa laa tafteena ba’dahum, waghfir lanaa wa lahum; nas’alullaaha lana wa lakum al-‘aafiyah. )
Forbidden Acts :
Also, the Messenger of Allah (s): “Forbade  that graves be plastered,  or be sat upon,  or be built over.” [Muslim] When the Prophet would finish the burial, he would stand at the grave and say: “Seek forgiveness for your brother and pray for hissteadfastness, for he is now being questioned.” [Abu Dawud, authenticated by al-Hakim]
Seeking from dead or supplicating to dead is an act of shirk so forbidden in our Shariah.
‘Wa annal masaajida lillah; fala tad’u ma’a Allahi ahada”
Verily, the mosques are for Allah (Alone), so do not pray to anyone along with Allah. [Jinn:18]
وَمَنۡ أَضَلُّ مِمَّن يَدۡعُواْ مِن دُونِ ٱللَّهِ مَن لَّا يَسۡتَجِيبُ لَهُ ۥۤ إِلَىٰ يَوۡمِ ٱلۡقِيَـٰمَةِ وَهُمۡ عَن دُعَآٮِٕهِمۡ غَـٰفِلُونَ
waman adhallu mimman yad’uu min duunillaahi man laa yastajiibu lahu ilaa yawmi lqiyaamati wahum ‘an du’aa-ihim ghaafiluun.
“And who is further astray than those who, instead of Allah, pray unto such as hear not their prayer until the Day of Resurrection, and are unconscious of their prayer,” [46:5]
This shows human emotions, crying does not benefit the person who passed away. The Prophet did not actually encourage it. But you must also understand its natural, part of your physical make up – that is why we have been taught that Prophet cried when some of his family members passed away.
We can also find in the sunnah that the one who passed away is punished for the crying of his families – This actually means the dead get hurt if it is conveyed to the dead person that his/her family is crying for him as result of his/her pass away, the dead person will have pain. It is not physical punishment or normal torment of grave because of crying of his/her family.
205] The Prophet cried for the dead and said: “This is mercy,”
although  he cursed the female wailers and the women who listen to their wailing. – In this wailing, there is no benefit for the dead person by actually doing this, so Prophet prevented this particular act of loud crying and wailing.
Gifting the dead:
And any good deed that is a means of nearness to Allah which is permissible and whose reward can be gifted to the deceased should be performed, as this would benefit him.
The Ulama agreed which is permissible – to pass on the rewards of those actions that the we have evidence in which Shariah stipulates the permissibility – hajj,umrah, sadaqa.
The other actions which do not have evidence eg: salaah and fast, in regards to this there are two views, the first view it its permissible – ImamShaf”ee , Imam Ahmad and view of the author as well.
And the second view that it is not allowed gifting the rewards of actions to the dead person unless the Shariah has stipulated the permissibility – Imam Abu Haneefa and Imam Malik – this view is the preferred view because when we look at the worship of Allah, it is actually from which is restricted (Toukifiyaa) that which you are not allowed to do except/unless you have evidences to the substantiate that act.
And Allah Knows Best.
Source: Notes taken from Course-Lecture7: by Shaikh Saad ibn Naasir Al Shithry, a former member of the Senior Scholars’ Council of Saudia Arabia and the Vice-President of KIU based on the book ’Manhaj As Salikin’ (The Methodology of the Traveller and a Clarification of Fiqh of the Religion) by Shaikh Abdur -Rahman As-Sa’di.