Sahih al-Bukhari Book 67, Hadith 170
Once Sa`da bint Zam`a went out at night for some need, and `Umar saw her, and recognizing her, he
said (to her), "By Allah, O Sa`da! You cannot hide yourself from us." So she returned to the Prophet (ﷺ)
and mentioned that to him while he was sitting in my dwelling taking his supper and holding a bone
covered with meat in his hand. Then the Divine Inspiration was revealed to him and when that state
was over, he (the Prophet (ﷺ) was saying: "O women! You have been allowed by Allah to go out for your
needs."
The Prophet (ﷺ) was screening me with his Rida' (garment covering the upper part of the body) while I was looking at the Ethiopians who were playing in the courtyard of the mosque. (I continued watching) till I was satisfied. So you may deduce from this event how a little girl (who has not reached the age of puberty) who is eager to enjoy amusement should be treated in this respect.
The Prophet (ﷺ) said, "If the wife of anyone of you asks permission to go to the mosque, he should not forbid her."