There is not a single verse in the Quran which prohibits ladies from entering mosques. There is not a single authentic Hadith which I am aware of which states that the Prophet (pbuh) prevented or forbade women from going to mosques.
There is only one Hadith, which perhaps could have been misunderstood to mean that women should not go to the mosque. That Hadith is as follows:
Abdullah Bin Mas’ud reported the Prophet (pbuh) as saying: It is more excellent for a woman to pray in her house than in her courtyard, and more excellent for her to pray in her private chamber than in her house. [Sunan Abu Dawood Vol.1 Chapter 204 Hadith No.570]
If you base your conclusion only on this single Hadith, then you may wrongly conclude that it is not advisable or preferable for women to go to the mosque. However, your conclusion cannot be based only on one Hadith neglecting or ignoring all the other Ahadith. The context of the Hadith is also very important.
The Prophet (pbuh) said that if a person prays in the mosque he gets 27 times more blessings (Sawab). Some women argued that they had infants at home and other household work and therefore could not go to the mosque. Thus, the men would have a greater advantage than women for receiving such blessings. It is then that the Prophet (pbuh) said the above Hadith.
Hence, the conclusion is that in situations where women have infants and household work, which too is an important duty that cannot be neglected, women would not be deprived of the sawaab (blessings) if they pray in their own homes.
2. There are several Ahadith which prove that both men and women used to go to the mosques during the life of the prophet (pbuh):
(i) The Prophet (pbuh) said, ‘Do not prevent the female servants of Allah from going to the mosque of Allah.’ [Sahih Muslim Vol.1 Chapter 177 Hadith No.886]
(ii) And husbands were specifically told by him, “If the wife of any one of you asks permission (to go to the mosque) do not forbid her.” (Sahih Bukhari Volume 1, Book of Salaah, Chapter 80, Hadith No. 832)
(iii) From the time the Prophet (pbuh) entered Madinah, after Hijra, till his demise, he never prevented women from entering the mosque.
(iv) During the time of the Prophet (pbuh), women not only went to the mosques for prayer but also for religious education and literary discussions as the mosque was the centre of community. Several Ahadith tell us that the Prophet (pbuh) addressed people in the mosque, and the audience consisted of both Muslim men and women. Women many a times asked questions to the Prophet (pbuh) in the mosque.
(v) During the Prophet’s (pbuh) time, mosques had separate entrances for ladies. Women filled the mosques from behind while men had separate entrances and filled the mosques from the front. In between the two sections were children.
(vi) It is reported by Abu Hurairah that the Prophet (Pbuh) said: “The best rows for men are the first rows, and the worst ones are the last. The best rows for women are the last ones, and the worst ones for them are the first.” [Sahih Muslim Vol.1 Chapter 175 Hadith No.881)
3. Islam permits women to pray in mosques. Ladies should have separate and equal facilities. Islam does not permit the intermingling of sexes.
4. In recent times, women are not allowed in mosques in a few countries especially in India and its neighbouring countries. Otherwise, in most of the other countries, women are allowed in mosques. Women are allowed in mosques in Saudi Arabia, in U.A.E; in Egypt, in U.S.A; in the U.K and in Singapore. Women are also allowed in the sacred mosques, Masjid-e-Haram in Makkah and in Masjid-e-Nabawi in Madinah.
Allahamdulillah, the trend is now changing in India. We have several mosques in India and a few in Mumbai in which women come to pray in mosques (masjids).