Narrated Ibn 'Umar: The Prophet (pbuh) said, "Allow women to go to the Mosques at night".
The Prophet Muhammad's teachings also emphasize the importance of modesty when visiting mosques or other places of worship; it is important for both men and women to dress modestly when attending religious services or engaging in spiritual activities. Furthermore, this hadith encourages Muslims to be mindful of their behavior while visiting mosques; it is important for all visitors - regardless of gender - to respect the sanctity of these holy places by refraining from any inappropriate behavior or language while inside them.