People believe that Muslims can pray salah in the street, and can pray salah at their homes as long as they are obeying only Allah. It is said in the Quran, “The whole world of it, is a mosque” (21:50). This verse means salah can be offered anywhere on earth and highlights the importance of performing salah despite where one may be.
Some argue that the act of salah doesn’t change whether you pray it inside a mosque or outside it. It is still the same act; therefore Muslims get the same reward wherever they pray it. Allah has put mankind on earth (which He created) so that we can worship Him. Just because people do not worship in the mosque doesn’t stop them from being a good Muslim.
However, I believe that one of the characteristics of a good Muslim is to make the effort to go to the mosque to pray. If a Muslim could not go to the mosque for a valid reason such as illness or when travelling, then he can pray elsewhere as long as he has the intention of worshipping only Allah. This does not make him a bad Muslim.
It is true that Allah is everywhere and not only in mosques, so wherever a Muslim worship s/he’s worshipping Allah. However, it was the practice of the Prophet (s) and his Sahabah’s (companions) to offer prayers in congregation as this created brotherhood and love amongst each other. A good Muslim is also someone who seeks to be united with other Muslims and one who loves others. Although a congregation can be established outside a mosque, it is the mosque where most of the Muslims in the community will gather and where a bigger sense of brotherhood will be created The holy Prophet (s) and the other Muslims at his time used to offer congregational prayers at a companions house named Aqram, before they built a mosque. The purpose of the mosque was to get all the Muslims united in one place rather than just praying in small separate groups.
Another reason why Muslims should worship Allah in a mosque is because here there is peace and no distractions. In a mosque there are no pictures of living things, no music and no television and because of this there are no distraction whilst worshipping Allah. A Muslim concentrates on his/her prayer due to this. The quality of their prayer makes them a good Muslim.
On the other hand, a place outside the mosque is bound to contain pictures of living things, entertainment, noise made by children, etc. This means that full concentration in a Muslims prayer is not given and s/he is not dedicated to worshipping Allah completely. A Muslim who does not concentrate in praying is not a good Muslim.
If a Muslim man or woman prays at home, then there will not be the atmosphere of brotherhood and there will not be the sense worshipping Allah together as a community because s/he will be the only one worshipping Allah alone. If Muslims go to the mosque, then there will be unity and love amongst members of the mosque.
A Hadith of Prophet (s) states, “You will not be believers until you have faith and you will not have faith until you love one another”.
Praying together in the mosque helps to create love as all are praying together and have the common aim of pleasing Allah.
The Holy prophet (s) went to the mosque regularly. If a Muslim goes to the mosque then s/he can be considered a good Muslim, s/he is following the Sunnah (practice) of the Prophet (s).
In a mosque there is no eating, drinking, shouting, singing and playing. It is a special place just made for purpose of worshipping Allah. Anywhere else besides a mosque, there is a lot of shouting, singing, messing around, etc, and it can be unsuitable to worship Allah in these conditions.