Visiting graves is not permissible for women. The Prophet (blessings and peace of Allah be upon him) said: Visit the graves, for they remind you of death and the Hereafter, addressing men. And he used to teach his Companions to say, when they visited graves, Al-salaamu alaykum ahl al-diyaar min al-mu'mineen wa'l-Muslimeen, wa inna in sha Allaah lalaahiqoon. As'al Allaah lana wa lakum al-aafiyah (Peace be upon you, O inhabitants of the graves, believers and Muslims. Verily we will, in sha Allaah, join you. I ask Allaah for well-being for us and for you). But in the case of women, he forbade them to do that.
The curse on women who visit graves is mentioned in several ahaadeeth, so it is not permissible for women to visit graves, but it is prescribed for them to pray for forgiveness and mercy for their deceased loved ones, and to pray that they be admitted to Paradise and saved from Hell, without visiting the graves; they can pray for them at home. There is also nothing to prevent them offering the funeral prayer for the deceased in the mosque or prayer-place, as the women offered the funeral prayer at the time of the Prophet (blessings and peace of Allah be upon him) and at the time of his Companions.
With regard to wailing and listening, the Prophet (blessings and peace of Allah be upon him) forbade wailing and said: There are four matters of jaahiliyyah that exist among my ummah and they will not give them up: boasting about one's forefathers, casting aspersions upon people's lineages, seeking rain by the stars and wailing for the dead. And he said: If the woman who wails does not repent before she dies, she will be raised on the Day of Resurrection wearing pants of tar and a chemise of scabs. Narrated by Muslim in his Saheeh.
So the Prophet (blessings and peace of Allah be upon him) explained that wailing for the dead is a blameworthy act of jaahiliyyah and it must not be done. Umm Atiyyah said: The Messenger (blessings and peace of Allah be upon him) took a pledge from us when we swore allegiance, that we would not wail. And Abu Dawood (may Allah have mercy on him) narrated in his Sunan from Abu Saeed (may Allah be pleased with him) from the Prophet (blessings and peace of Allah be upon him) that he cursed the woman who wails and the one who listen to her. There is some weakness in its isnaad, but there is corroborating evidence for its meaning, so wailing is haraam and reprehensible, and it is not permissible for a woman to be involved in wailing, or for a man to do that either.
Wailing refers to raising the voice when weeping and saying, O my support, O one who clothed me, O how sad I am and so on. The one who listens is the woman who listens to the ones who are wailing and encourages them, so she sits with them and encourages them to wail. This is included because sitting with them is a kind of encouragement. So it is not permissible to listen to them. If the one who is wailing will not be quiet, it is obligatory to leave her and not sit with her, by way of shunning her and denouncing her. If a woman sits with her and listens to her, this is a kind of help and encouragement.
So it is not permissible to listen to one who is wailing; rather she should denounce her and tell her not to do that. If she stops, all well and good, otherwise you should leave her and not sit with her and listen to her. End quote.
Shaykh Abd al-Azeez ibn Baaz (may Allah have mercy on him)
Reproduced from Islam QA