The Prophet Muhammad instructed that women should not be prevented from attending the mosque if they wish to, saying, 'Do not prevent the female servants of Allah from the mosques of Allah' (Sahih al-Bukhari 900; Sahih Muslim 442). Women in Madinah, including some of the Prophet's own wives, prayed in his mosque regularly, including at night. At the same time, many hadith and the broader guidance of the Companions indicate that a woman's prayer in the privacy of her own home carries its own, often equal or greater, reward and is generally easier to perform with full concentration. This is why classical jurists, especially in the Hanafi school, historically discouraged women's attendance at crowded night prayers out of concern for safety, propriety, and the potential for public disorder, while never treating home prayer as obligatory for women or mosque prayer as forbidden. The practical position accepted by most scholars today is one of permission with etiquette: a woman may pray at the mosque in modest dress, without perfume, and observing appropriate spacing, and the choice between mosque and home is largely a matter of circumstance, safety, and personal devotion rather than fixed rule.
Q&A · Prayer
Is it better for women to pray at the mosque or at home?
References
Sahih al-Bukhari 900Sahih Muslim 442
Informational, not a personal fatwa. Consult a qualified scholar for rulings on your situation.