It is narrated from Ibn Umar (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) said: "Do not prevent the female servants of Allah from coming to the mosques of Allah."
Hadith Referenceمسند الإمام الشافعي / كتاب عشرة النساء والإيلاء والخلع / 1208
Hadith Takhrijاخرجه البخاري، النكاح، باب استئذان المرأة زوجها في الخروج الى المسجد وغيره (5238) ، 900 - و مسلم، الصلاة، باب خروج النساء الى المساجد اذا لم يترتب ..... الخ (442)۔