In Islam, it is recommended for a Muslim to arrange for their funeral matters in advance. Although it is not obligatory, it is considered a good act of worship and a means of preparing for the inevitable journey to the hereafter.
There are several authentic hadiths that emphasize the importance of
preparing for one's death and funeral arrangements. One of the most
well-known hadiths is narrated by Abdullah ibn Abbas in which the
Prophet (peace be upon him) said,
"Take advantage of five before five: your youth before your old age,
your health before your sickness, your wealth before your poverty,
your free time before you become occupied, and your life before your
death." (Al-Bukhari)
This hadith suggests that one should make the most of their life and prepare for the afterlife before death. One aspect of this preparation is making arrangements for one's funeral.
Another hadith narrated by Abu Huraira states that the Prophet (peace
be upon him) said,
"When a Muslim dies, and a group of Muslims numbering one hundred pray
Janazah (funeral) prayer for him, all interceding for him, their
intercession is granted." (Muslim)
This hadith shows the importance of having a proper funeral with a congregation of Muslims praying for the deceased. To ensure this, it is recommended for a Muslim to make arrangements in advance and provide for the expenses of the funeral.
Additionally, the Prophet (peace be upon him) said,
"It is better for a man to leave his heirs well-off than to leave them
poor, begging people." (Muslim)
This hadith highlights the importance of leaving behind provisions for one's family and not burdening them with financial worries after one's death, including funeral expenses.
Therefore, while it may not be obligatory, it is highly recommended for a Muslim to arrange for their funeral matters in advance as a means of preparing for the inevitable journey to the hereafter and not burdening their family with financial worries.