Basically there are three kinds of Islamic traditions (Riwayat) about the topic.
First: The Mosque of a woman is her home and it is better to stay at home for herself and offer Namaz and if she does so, she will be rewarded just like the men offering their Namaz in Mosque with jama'at.
Second: It is allowed or better to go to mosque for women.
Third: Motivation and recommendation for going to mosque for men and women both.
Due to the variety of traditions, the fatwas of Maraje also differ in this regard so in summary we can say that it is better to go to mosque for a woman but with a few conditions:
1. She shouldn't go alone, she should go with other ladies or her Maharim
2. She should wear complete Islamic Hijab.
3. She shouldn't stay between home and mosque
4. She shouldn't use make up and perfume
5. It shouldn't be any mix gathering in the mosque
6. She shouldn't talk with a high tone and volume and should avoid useless conversation in the mosque.
These conditions have been put just because Islam wants to ensure the protection of Hijab and Chastity of women.