All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
The jurists differed in opinion concerning “women’s visit to graves”. The correct opinion is that it is permissible with some conditions. The evidence is a Hadeeth reported by Imam Muslim. Buraydah narrated that the Prophet said: “I forbade you from visiting graves, but you may now visit them, for that is a reminder of the Hereafter.” Women also need to be reminded by death just like men. The Prophet said: “Verily, women are but the twin halves of men.” [Abu Daawood, At-Tirmithi, Ibn Maajah and Ahmad, Al-Albaani: Hasan]
The Hadeeth that reads: “May Allah curse those women who frequently visit the graves, and those who kindle lamps on them”, shows that the curse of Allah will be upon those women who frequently visit graves, or those women who have lack of patience, or those who mourn.
Abu Saeed Al-Khudri narrated that the Prophet said: “I forbade you from visiting graves, now you can visit them. Indeed, the graves visit teaches lessons, and do not tell any thing which is disliked in Islam.” In short, women can visit graves on condition that there should not be any act against Islam; i.e., crying, mourning, lamentation, shamelessness etc. In addition to that, the visit should be occasionally. The woman should also be accompanied by a Mahram.
Allah knows best.