Q: Is it permissible for women to visit graves?
A: It is authentically reported that the Messenger of Allah (peace be upon him) cursed the women who visited graves, according to the Hadith narrated by Ibn 'Abbas, Abu Hurayrah, and Hassan ibn Thabit AlAnsary (may Allah be pleased with them all). The scholars have deduced from this report that it is Haram (prohibited) for women to visit graves, because cursing is only mentioned in relation to deeds that are Haram.
Therefore, the correct view is that it is Haram for women to visit graves, not just Makruh (reprehensible). The reason is and Allah knows best that women in general have little patience, and this may result in them wailing or the like, and this contradicts the obligatory patience in this situation.
"Visit graves, for they remind you of the Hereafter." (Related by Muslim in his "Sahih [Book of Authentic Hadith]")
(Glorified and Exalted be He) has declared this to be Haram (prohibited) for His Servants when He says: And the mosques are for Allâh (Alone): so invoke not anyone along with Allâh. And when He (may He be Praised) says: Such is Allâh, your Lord; His is the kingdom. And those, whom you invoke or call upon instead of Him, own not even a Qitmîr (the thin membrane over the datestone).
If you invoke (or call upon) them, they hear not your call; and if (in case) they were to hear, they could not grant it (your request) to you. And on the Day of Resurrection, they will disown your worshipping them. And none can inform you (O Muhammad ﺻﻠﻰ ﺍﷲ ﻋﻠﻴﻪ ﻭﺳﻠﻢ) like Him Who is the AllKnower (of everything).
Allah (may He be Praised) makes it clear that calling upon dead believers and others is Shirk and worshipping other than Him. Allah (may He be Praised) also says: And whoever invokes (or worships), besides Allâh, any other ilâh (god), of whom he has no proof; then his reckoning is only with his Lord. Surely! AlKâfirûn (the disbelievers in Allâh and in the Oneness of Allâh, polytheists, pagans, idolaters) will not be successful.
He thereby calls supplicating to other than Allah Kufr (disbelief). It is obligatory upon Muslims to beware of this and it is obligatory on the scholars to clarify these matters for people, so they will be aware of Shirk. Many ordinary people, when passing by graves of those whom they glorify, implore their help and say, "O soandso! Madad! Madad! (Give me strength)," "I seek your help", "Help me", "Support me" or "Cure my illness." All of this is major Shirk and may Allah protect us from it! These things can only be asked from Allah (Glorified and Exalted be He), not from the dead nor from any other creature.
As for those who are alive, they can be asked what they can do, if they are present and can hear you, by speaking directly to them, or by writing, by phone, or any similar sensible means. They can be asked by these means to do whatever they are able to do, such as to help in your home, work on your farm, etc., because they are acquaintances of yours or you help each other out. There is nothing wrong in this, as Allah (Glorified and Exalted be He) says in the story of Musa (Moses, peace be upon him): The man of his (own) party asked him for help against his foe
But asking the dead, those who are absent, unseen, or inanimate objects, such as idols, to cure an illness, to grant victory against an enemy, etc., this is major Shirk. The same ruling applies to asking a living person who is present to do what none but Allah (may he be Praised and Glorified) can do.
The same ruling applies if you believe that someone has a certain secret power over the universe which they can use to give whoever they want or deprive whoever they want, as some ignorant people believe of those they call the Awliya' (pious people). This is Shirk AlRububiyyah (associating others in the Lordship with Allah), which is graver than the Shirk of worshipping idols.
Thus, the Shar'y (Islamically lawful) visit to the deceased is to ask Allah to have mercy on them, to remember the Hereafter and prepare oneself for it, and to remember that you will die as those who have already died and to prepare yourself for the Hereafter, and to supplicate to Allah for your deceased fellow Muslims asking Him to have mercy on them. This is the wisdom behind permitting visits to graves. May Allah grant us success!