Though according to the shariyah, women have equal rights of entering the mosque as the men. Even at the time of the Holy Prophet (pbuh) women used to enter the mosque with hijab and used to pray freely. Then when and why did the women start the tradition of staying away from mosque?
I once went to a mosque in India and asked "Why are there no women here?". One brother inside, who I think was the imam of the mosque, answered "They are only allowed in Ramadan for Tarawih". I said "Where did this start?" He said there is a hadith of Umar ibn Al Khattab(RA) that he saw women dressed lewdly and banned them from the mosque. The word got to Aisha(RA) and she commented that "If Rasulullah (SAW) was alive he would have also forbidden them from coming".
This riwayah/narration later got deformed to mean "ALL women" and was implied as a standard fixed by Umar(RA) for banning women from masjid.
The brother said that was taught at Dar Al Uloom Deoband.
All those preventing women from entering mosque are doing it because of cultural reasons in south east asia. Muslim women around the world go for juma/ taraweh. If a muslimah out of free will chooses not to go because of household duties there is no blame on her. But as a male the following hadith should be enough for "not allowing" women to enter mosque
Narrated Salim's father: the Prophet said, "If the wIfe of anyone of you asks permission to go to the mosque, he should not forbid her."
(Sahih Al-Bukhari: Book 62, Hadith 165)
My understanding of this is that in south east asia where lower caste are not allowed into temples of the higher class. This tradition has somewhat crept in from there.
Our traditional rules have segregated women and men. By traditional rules, women are most often told to occupy the rows behind the men. In part, this was a practical matter as the traditional posture for prayer - kneeling on the floor, head to the ground - made mixed-gender prayer uncomfortably revealing for many women and distracting for some men. Traditionalists try to argue that Muhammad preferred women to pray at home rather than at a mosque, and they cite a hadith in which Muhammad supposedly said: "The best mosques for women are the inner parts of their houses," although women were active participants in the mosque started by Muhammad. Muhammad told Muslims not to forbid women from entering mosques. They are allowed to go in. The second Sunni caliph ʻUmar at one time prohibited women from attending mosques especially at night because he feared they may be sexually harassed or assaulted by men, so he required them to pray at home. Sometimes a special part of the mosque was railed off for women; for example, In Jamma masjid, New Delhi we might have noticed there are sections in the masjid both the sides seperated from the inner section of the masjid to make a separate place for women.
Women are allowed in the mosque if they follow the right mode of dressing. But looking at the world today, not all women dress in the right islamic mode of dressing.That is why people decide to follow the hadith of sayidina Umar, Who banned a woman in his time for entering the mosque because she was dressed inappropriately.The Fact is that islam does not permit mixing of sexes. And the propehet also said for a woman to pray in her courtyard so she may gain more reward; So she is to decide.