What is the ruling for women who want to visit the graves of their beloved ones? Is it permissible for them to do so? Should they do so, at a time when other men are not around?
Is there any Hadith on this regard?
Well there's a consensus among scholars that men are allowed to visit graveyards and graves because of this Hadith (most narrated by ibn Buraidah from his father (May Allah be pleased with him) for example in Sahih Muslim, in Jami' at-Tirmdihi, in Sunan abi Dawod and sunan an-Nasa-i, and narrated by abi Said al-Khudry (May Allah be pleased with him) in al-Muwatta', and also narrated by ibn Masu'd (May Allah be pleased with him) in Sunan ibn Majah) which shows that visiting them was prohibited (because people were still new to Islam and apparently there have been some pagan rituals or something like that which made it unlawful) but then this was abrogated by this hadith.
But one can already deduce from this hadith that it would be acceptable for woman to visit graves if they keep away from any kind of non-Islamic rituals and teachings, as what applies for men should apply for women too, especially as the hadith uses the plural form so from a linguistic point of view women would be included!
When it comes to women there's no consensus, but according this Fatwa (in Arabic) it is allowed if the rules of shari'a are fulfilled. So you may have according to the madhabs opinions allowing it and considering it as a lawful and mustahab act, but those may make differences between ages allowing or prohibiting it for widows and older women but not young girls ... and vice versa, but also some prohibiting it for women in general. The major evidence for allowing it is the Hadith of 'Aisha (May Allah be pleased with her)in Sahih Muslim and sunan an-Nasa-i where she asked our Prophet (peace be upon him) what to say if she visited the cemetery! An other evidence is quoted in this fatwa (Arabic) where a man has met um al-Mu'minyn 'Aisha coming from the cemetery after visiting the grave of her brother. Salafi scholars tend to say she passed by the grave and didn't visit it even if al-Hafid al-'Iraqi and even the salafi scholar al-Albani consider this narration as sahih! We must also remember that 'Aisha was visiting the grave of our Messenger (Peace be upon him) and her father abu Bakr (May Allah be pleased with him) as they were buried in her house. But when 'Omar (May Allah be pleased with him) was buried there she began to wear hijab to visit the graves of the three of them in a sahih hadith which can be found in mishkat al-Masbih (1712), majma' az-zawaa-id of al-Haythami (8/29), al mustadrak of al-Hakim (3/63) and Musnad al-Imam Ahmad (6/202) :
عن عائشة رضي الله عنها قالت: كنت أدخل بيتي، الذي دُفِنَ فيه رسول الله صلى الله عليه وسلم وأبي، فأضع ثوبي، فأقول إنَّما هو زوجي وأبي، فلمَّا دُفِنَ عمر معهم، فو الله ما دخلت إلَّا وأنا مَشْدُودَةٌ عليَّ ثيابي؛ حَيَاءً مِن عمر
Whenever I entered the house in which Prophet (Peace be upon him) and my father (i.e. Abu Bakr ra) are buried, I used to take off my sheet (from head) thinking that it’s only my father and husband (whom I am visiting), however By Allah! When Umar (ra) got buried with them, I never went inside without being fully covered, this is because of being ashamed of Umar (ra)
(source of the translation)
So (some) salafi scholars seem to take as an evidence the hadith narrated by abu Huraira (May Allah be pleased with him) in musnad al-Imam Ahmad and other sunnah collections, but this was explained by other scholars as to be meant to apply only for those women who used to do pagan rituals on graves like going there to cry and sought etc.!
And Allah knows best!