In islam, praying the janazzah (funeral) prayer is prescribed for both men and women,
The prophet Muhammad(peace be upon him) said: “Whoever attends the janaazah until he offers the prayer will have one qeeraat (of reward), and whoever attends until (the deceased) is buried will have two qeeraats.” It was said, “O Messenger of Allaah, what are the two qeeraats?” He said, “Like two great mountains,” meaning, of reward. (Saheeh – agreed upon).
But the women are not permitted to follow the funeral procession to the graveyard as was reported in al-Saheehayn that Umm Salamah (may Allaah be pleased with her) said: “We were forbidden to follow the funeral procession but it was not made absolute on us.” (narrated by Muslim).
They can pray the funeral prayer anywhere: in a house, prayer place or in the mosque. But not in the graveyard. Women used to offer the janaazah prayer with the Prophet (peace and blessings of Allaah be upon him) in his mosque and after his lifetime.
Visiting graves is something only for men as is taking part in the funeral procession. the Messenger (peace and blessings of Allaah be upon him) cursed women who visit graves. The reason for that – and Allaah knows best – is that there is the fear that if women were to follow funeral processions to the graveyard or visit graves, that would cause fitnah (temptation) to others or to themselves. The Prophet (peace and blessings of Allaah be upon him) said, “I have not left behind any fitnah more harmful to men than women.” (Saheeh – agreed upon).
And Allaah is the Source of strength.