Imam Malik and some Hanafi scholars, and, according to one report from Ahmad, most of the scholars hold it permissible for women to visit graves. This is based on the following hadith from ‘Aishah, “What should I say to them, O Messenger of Allah when visiting graves?” As mentioned above Abdallah ibn Abi Mulaikah is also reported to have said, “Once ‘Aishah returned after visiting the graveyard. I asked, ‘O Mother of the Believers, where have you been?’ She said: ‘I went out to visit the grave of my brother Abd ar-Rahman.’ I asked her: ‘Didn’t the Messenger of Allah, peace be upon him, prohibit visiting graves?’ She said, ‘Yes, he did forbid visiting graves during the early days, but later on he ordered us to visit them’.” This is reported by Al-Hakim and Al-Baihaqi, who also remarked that this hadith was narrated only by Bistam bin Muslim al-Basri. Azh-Zhahabi said that it is a sound hadith.
Anas reported: “The Prophet, peace be upon him, saw a woman crying by the grave of her son, and said to her, ‘Fear Allah, and be patient.’ She replied, ‘What do you care about my tragedy?’ When he went away, someone told her, ‘Indeed, that was the Messenger of Allah, peace be upon him.’ The woman felt extremely sorry and she immediately went to the Prophet’s house, where she did not find any guards. She called out: ‘O Messenger of Allah! I did not recognize you.’ The Prophet, peace be upon him, said, ‘Verily patience is needed at the time of the first affection.” (Bukhari and Muslim) This supports the argument in favour of the permissibility of women visiting graves, for the Prophet, peace be upon him, saw her at the grave and did not show his disapproval of it.
The purpose of visiting graves is to remember the Hereafter, which is something that both men and women need. Men are by no means more in need of this reminder than women. Some scholars disliked it for women to visit graves as they are less patient and too emotional. The Prophet, peace be upon him, said, “May Allah curse the women who are frequent visitors of the graves.” (Reported by Ahmad, Ibn Majah, and Tirmizhi, who said that it is a sound hadith)
Al-Qurtubi said: “The curse mentioned in this hadith applies only to those women who visit graves frequently. The reason for this curse lies perhaps in the fact that it involves infringement of the rights of the husband, and leads to adornment and exhibition of their beauty to strangers, and shouting, yelling, and other similar things.” It may be said that, “If no such harm is feared from women visiting graves, then there is no valid reason for preventing them from visiting graves, for indeed remembrance of death is something that both men and women equally need.” Commenting on Al-Qurtubi’s view, Ash-Shawkani said, “This statement may form the basis for reconciling apparently contradictory hadith.”