It is not lawful to put a branch of a palm or flowers on a grave. The contrary is suggested by the following hadith reported by Bukhari and others from Ibn ‘Abbas: “The Prophet, peace be upon him, passed by two graves and said, ‘Those two are being punished for a minor matter. The first did not clean himself carefully after urinating. The second one used to spread lies.’ Then the Prophet, peace be upon him, asked for a fresh branch of a palm tree, broke it into two parts, and then placed a part on each of them, saying, ‘I hope that this will reduce their punishment for as long as the branch remains fresh.’ Al-Khattabi is of the opinion, however, that “This placing of a branch of a palm on the graves, while saying, “I hope that this will reduce their punishment for as long as it remains fresh,” is a blessed effect of the Prophet, peace be upon him, and of his supplication to Allah to lighten their punishment. “According to Al-Khattabi, “He hoped, as it were, that the two would be relieved of their punishment so long as the palm branch remained fresh. This, however, does not have anything to do with the freshness or dryness of the palm branch or its role in lightening the punishment as such. Though the masses in many of the Muslim countries place branches of palm over the graves of their relatives, this practice has no basis or merit in the light of Islamic teachings.”
Al-Khattabi’s opinion as reported above is correct. The Companions of the Prophet, may Allah be pleased with them, were familiar with this and practiced it. Bukhari reported that, “There is no evidence to show that anyone of them ever put a branch of a palm or a bunch of flowers on graves, except on the grave of Buraidah al-Asalmi, who had instructed his heirs in his will that two branches of palm be placed on his grave.” (Bukhari) The idea that such a practice was lawful, and yet was unknown to all the Companions, except Buraidah, is not plausible. Al-Hafiz said in Al-Fath: “Apparently Buraidah took the hadith in its general import and did not regard it as specifically related to those two men.” Ibn Rashid said: “It is apparent from Bukhari’s commentary that it was specifically done by the Prophet, peace be upon him, for those two men. He also quoted a statement of Ibn ‘Umar, who, when he noticed a tent was set up over ‘Abd ur Rahman’s grave, said: ‘Take it away; the only thing that can shade him is his deeds’.” Ibn Umar’s statement shows that he realized that placing anything over a grave does not benefit the deceased, except his own good deeds.