Can You Pray in Congregation at Home?
Question

Is it permissible to offer prayer in congregation at home, and not go to the mosque?
Praise be to Allah.Can you pray in congregation at home?
Shaykh Ibn `Uthaymin (may Allah have mercy on him) said:
“We advise these people to fear Allah, may He be Glorified and Exalted, and to pray in congregation with the Muslims in the mosques, for the most correct scholarly view on these matters is that prayer in congregation must be offered in the mosques , and it is not permissible for a man to stay away from congregational prayers in the mosque unless he has an excuse. 
The Prophet (peace and blessings of Allah be upon him) said: “I was thinking of ordering a man to call the Iqamah, then I would order a man to lead the people in prayer, then and I would go with some men carrying bundles of firewood, to people who do not attend the prayer in congregation , and I would burn then and their houses down around them.” 
These people may have prayed, but the Messenger (peace and blessings of Allah be upon him) wanted them to pray with the congregation that is described as such in Shari`ah, and the congregation that is described as such in Shari`ah is the congregation that prays in the mosque. And the mosques are the places where people are called to come at the time of prayer. Hence ‘Abdullah ibn Mas`ud (may Allah be pleased with him) said: “Whoever would like to meet Allah tomorrow as a Muslim, let him regularly attend these prayers where the call to them is given.” 
“Where the call to them is given” means the place from which the call is made. This has to do with the five daily prayers. 
Can you pray Jumu`ah at home?
With regard to Jumu`ah (Friday prayer), it is definitely obligatory to offer it in the mosque . 
Can you pray Nafl (supererogatory) prayers at home?
With regard to Nafl prayers, the Prophet (peace and blessings of Allah be upon him) said: “The best of prayers is that which is offered in one’s house , except the obligatory prayers.”  
Based on this, it is better for a person to offer supererogatory prayers in his house, apart from the supererogatory prayers which are prescribed in the mosque such as the eclipse prayer , assuming that it is not obligatory. And Allah is the Source of strength.” (Majmu` Fatawa Ibn ‘Uthaymin, 15/19) 
Shaykh Ibn ‘Uthaymin (may Allah have mercy on him) also said: 
“It is not permissible for anyone or for any group to pray in the home when the mosque is nearby. But if the mosque is far away , and they cannot hear the Adhan, then there is no sin on them if they pray in a congregation in the house. The heedlessness that some people exhibit with regard to this issue is based on the view of some scholars (may Allah have mercy on them) that the purpose of praying in congregation is to bring people together in prayer even if that is not in the mosque, and that if people pray in congregation, even in their homes, then they have done what is required. 
But the correct view is that it is essential for the congregation to be in the mosque , because the Prophet (peace and blessings of Allah be upon him) said: “I was thinking of ordering a man give the Iqamah…” (Majmu` Fataawa Ibn ‘Uthaymin, 15/20)
And Allah knows best.