Answered by Shaykh Faraz Rabbani
Women Praying in the Masjid
As for just praying, a woman’s prayer in the depths of her house has more reward than for her to pray in the masjid; in one narration, more reward than praying in the Prophet’s masjid itself, upon its dweller the best of blessings and most perfect of peace. Some scholars mention that the reward men get for praying in congregation is attained by women when they pray at home.
However, as many scholars note, including Shaykh Hassaan al-Hindi of Damascus and Mufti Taqi Usmani, if a woman goes to the masjid to attain unto beneficial religious knowledge (or other religious benefit) that may not be reasonably obtained elsewhere, then it would not only be permitted for her to go to the masjid for this reason, but praiseworthy, as long as there is no intermingling and no resultant fitna or negligence of primary responsibilities (such as in the case of a wife). This, of course, would have to be done according to the proper norms of Islamic behavior: the woman would have to be properly dressed, get to the masjid in an appropriate and safe manner, not travel alone at night, and avoid all intermingling with men.
And Allah knows best.