Nowadays, we see very few kids coming to the masjid. Why?
It’s actually saddening that some parents have started to prevent their own kids (below age 7), from going to the masjid. A few years later, you will find those same parents complaining about how their kids do not pray salah.
Today, I want to share with you a very beautiful answer of Shaykh Al Albaani Rahimahullah regarding the topic of bringing a small child to the masjid to pray even though he has not reached the age of 7.
 He said:
You know, that the early Salaf, at the head of whom was our Prophet ﷺ, used to allow their children to enter his masjid ﷺ.
And you’ll remember the story which one of the Companions narrated, [in which he stated] that one day he was praying ’Asr behind the Prophet ﷺ, and the Messenger of Allaah ﷺ prolonged the prostration during some of it, prolonging it to an extent which was not customary, so this Companion raises his head to make sure his Prophet ﷺ is okay, he feared that he may have passed away—when to his surprise he sees a strange sight, he sees him in prostration, and al-Hasan and al-Hussain … so the Companion feels at ease [that the Prophet ﷺ is okay] and falls back into prostration.
After he ﷺ gave salaam to end the prayer, they said to him, ‘O Messenger of Allaah! You prostrated in the prayer and prolonged it …’ so he ﷺ said, ‘My son was riding on my back and I did not want to disturb him …’ this boy went to the masjid for the prayer, he was, as you said, not at an age where he was able to differentiate—reminding those who pray, whether men or women, not to bring their children with them to the masjid, was not part of his ﷺ guidance.
In fact, he used to endorse them doing that in opposition to the well-known hadith whose chain of narration is not authentic, ‘Keep your infants, your insane, your evil ones and your buying and selling away from your masajid …’, even though the last part of the hadith is authentic, proven to be so by other authentic hadiths, as is not hidden from you, in shaa Allaah.
The point being, he ﷺ never used to prevent them [from bringing their children to the masjid], in fact, he used to endorse it, in fact, he had a ruling specific to it: [where] he took into consideration the feelings of the mothers who used to pray behind him in salaah, and whose children were crying, the Prophet ﷺ [even] while he was calling upon his Lord, would take note of the fact that there was a woman praying who had her child with her, and so, ‘I stand in prayer, then I hear a child crying, so I make my prayer brief because I do not want to cause hardship to for his mother.’
Thus, he would shorten the lengthy recitation, which was a habit of his ﷺ, in order to free up a mother for her child. He ﷺ could have done the same as many of the ignorant Imaams do and have said, ‘Why do you bring your children to the masjid, disturbing us?’ and so on—he ﷺ did nothing of the sort.
So based upon this, it’s more fitting that a child, if he were raised with an Islamic upbringing, and then longs to go to the masjid, even if it were [just] to play, even if it were [just] to play, if he asks to go with his father to the masjid then the father should fulfill his request, since it will get him used to going to the best of all places, [the place] about which the Prophet ﷺwas asked [the following question]: ‘What is the best of all places and the worst?’ and so he ﷺ answered, ‘The best of all places are the masajid, and the worst are the markets.’
So if a child was raised like that, and then wants to go to the mosque instead of the streets or alleys, then this is a blessing and very pleasing news.
Subhan’Allah. It is really vital and essential to put that connection and love for the masjid in the hearts of our children as early as we can.
Truly, it all boils down to how much tarbiyah that parents have given to their kids. Some parents do not really give such importance to this topic until it starts to become hard for them to send their growing kids to the masajid to pray.
Let this be a reminder to each and every one of us, not only for the parents who have kids but even those who frequent the masajid to pray, be kind and gentle to the children who play or come to the masajid.
Truly, kids are very intelligent and observant, if you show them compassion and gentleness, they will do the same as they grow up. Do not reprimand them, if they are starting to distract others in prayer – correct them in a soft and gentle way rather than shouting and threatening them.
Remember these kids are the next generation who would stand in congregations glorifying Allah, it is not befitting for us to discourage them just because “we” think they are just playing. It might be that one of the kids you have shouted at in a certain masjid would be the same kid who you’ll be standing behind as he leads the entire congregation for salah.
May we become people who always encourage others to do better for the sake of Allah rather than discouraging them from correcting them harshly. Amin
– Umm Umar Khaled
 Al Hudaa wan Noor, 668