Ibn ‘Umar reported the Messenger of Allah (ﷺ) as saying; Do not prevent your women from visiting the mosque; but their houses are better for them (for praying).
Sunan Abi Dawud Book 2, Hadith 177