Praying Taraweh in congregation in the mosque is better than praying at home.
This is indicated by the Sunnah and the actions of the Sahaabah (may Allaah be pleased with them).
1 – al-Bukhaari (1129) and Muslim (761) narrated from ‘Aa’ishah (may Allaah be pleased with her) that the Messenger of Allaah (peace and blessings of Allaah be upon him) prayed one night in the mosque, and the people followed him in prayer. Then he prayed the next night, and many people came. Then they gathered on the third or fourth night, and the Messenger of Allaah (peace and blessings of Allaah be upon him) did not come out to them. The next morning he said: “I saw what you did, and nothing kept me from coming out to you except the fact that I feared that it would be made obligatory for you.” And that was in Ramadaan.
This indicates that praying Taraweeh in congregation is prescribed according to the Sunnah of the Prophet (peace and blessings of Allaah be upon him), but he refrained from doing it because he feared that it would be made obligatory for the ummah. When the Prophet (peace and blessings of Allaah be upon him) died, this reservation was no longer required, because the sharee’ah was established.
2 – al-Tirmidhi (806) narrated that Abu Dharr (may Allaah be pleased with him) said: The Messenger of Allaah (peace and blessings of Allaah be upon him) said: “Whoever prays qiyaam – i.e., Taraweeh – with the imam until he finishes, it will be recorded as if he spent the whole night in prayer.”
Classed as saheeh by al-Albaani in Saheeh al-Tirmidhi.
3 – al-Bukhaari (2010) narrated that ‘Abd al-Rahmaan ibn ‘Abd al-Qaari said: I went out with ‘Umar ibn al-Khattaab (may Allaah be pleased with him) to the mosque one night in Ramadaan, and the people were scattered, each man praying by himself. Some men would pray and have groups of people behind them following them. ‘Umar said: “I think that if I unite all these people with one reader, it will be better. Then he resolved to gather them behind Ubayy ibn Ka’b.
Ibn al-Teen and others said that ‘Umar based this decision on the Prophet’s approval of those who prayed with him on those nights. Although he disliked that for them, that was based on the fear that it might be made obligatory for them. When the Prophet (peace and blessings of Allaah be upon him) died, there was no longer any fear of that happening, and ‘Umar thought, because of the potential division that might arise from people praying separately, and because uniting them behind one reader is more motivating for many people. The majority agreed with ‘Umar’s decision. End quote from Fath al-Baari.
Al-Nawawi said in al-Majmoo’, 3/526:
Praying Taraweeh is Sunnah according to scholarly consensus… It is permissible to offer this prayer alone or in congregation, but which is better? There are two well-known opinions on this matter. The correct view according to the consensus of our companions is that praying it in congregation is better. The second view is that it is better to pray it individually.
Our companions said: The difference of opinion has to do with one who has memorized the Qur’aan; there is no fear that he may become lazy and neglect it if he prays on his own, and the congregation in the mosque is not going to be affected if he stays away. But if one of these factors is absent, then praying in congregation is better, and there is no difference of scholarly opinion on this point.
The author of al-Shaamil said: Abu’l-‘Abbaas and Abu Ishaaq said that praying Taraweeh in congregation is better than praying it individually, because of the consensus of the Sahaabah and the consensus of the scholars of the regions on this point. End quote.
Ibn al-Mubaarak, Ahmad and Ishaaq favoured praying with the imam during the month of Ramadaan.
It says in Tuhfat al-Ahwadhi:
In the book on night prayer (qiyaam): it was said to Ahmad ibn Hanbal: Do you prefer a man to pray with the people in Ramadaan or on his own? He said: He should pray with the people. He said: And I prefer that he should pray with the imam and pray Witr with him. The Prophet (peace and blessings of Allaah be upon him) said: “If a man prays qiyaam with the imam until he finishes, it will be recorded as if he spent the rest of the night (in prayer).” Ahmad (may Allaah have mercy on him) said: “He should pray with the people until he prays Witr with them, and he should not leave until the imam leaves. Abu Dawood said: I saw him (Imam Ahmad) – in the month of Ramadaan, praying Witr with his imam, except on one night when I did not attend. Ishaaq (may Allaah have mercy on him) said: I said to Ahmad: Is praying qiyaam in Ramadaan in congregation dearer to you or praying on one’s own? He said: I prefer that this prayer should be offered in congregation, so as to revive the Sunnah. And Ishaaq said the same. End quote.
See al-Mughni, 1/457.
Shaykh Ibn ‘Uthaymeen said in Majaalis Shahr Ramadaan, p. 22:
At first the Prophet (peace and blessings of Allaah be upon him) used to pray Taraweeh in congregation in the mosque, then he stopped because he feared that it might be made obligatory upon his ummah…
Then he quoted the two ahaadeeth quoted above. Then he said:
No man should keep away from Taraweeh prayer lest he misses out on the reward for it. And he should not leave until the imam finishes Taraweeh and Witr, so that he may attain the reward of spending the whole night in prayer. End quote.
Al-Albaani said in Qiyaam Ramadaan: Rather it (praying Taraweeh in congregation) is better than praying it alone, because the Prophet (peace and blessings of Allaah be upon him) did it himself and explained its virtue.
Rather he did not lead them in praying it in congregation for the rest of the month because he feared that praying at night during Ramadaan might be made obligatory for them, and they would be unable to do that, as it says in the hadeeth of ‘Aa’ishah which is narrated in al-Saheehayn and elsewhere. This concern no longer applied after the Prophet (peace and blessings of Allaah be upon him) died and Allaah had completed Islam. Hence the reason for not praying in congregation when offering night prayers in Ramadaan was no longer present, and the previous ruling remained in effect, which is that it is prescribed to offer this prayer in congregation. Hence ‘Umar (may Allaah be pleased with him) revived it, as it says in Saheeh al-Bukhaari and elsewhere. End quote.
It says in al-Mawsoo’ah al-Fiqhiyyah (27/138):
From the time of ‘Umar (may Allaah be pleased with him), the Rightly-Guided Caliphs and the Muslims regularly offered Taraweeh prayer in congregation. ‘Umar (may Allaah be pleased with him) is the one who united the people in offering the prayer behind a single imam.
Asad ibn ‘Amr ibn Abi Yoosuf said: I asked Abu Haneefah about Taraweeh and what ‘Umar did. He said: Taraweeh is a confirmed Sunnah, and ‘Umar did not base his decision on speculation and he was not introducing bid’ah (an innovation). He did not enjoin it except because of what he knew from the Messenger of Allaah (peace and blessings of Allaah be upon him). ‘Umar introduced this and gathered the people behind Ubayy ibn Ka’b and he offered this prayer in congregation, at the time when the Sahaabah – the Muhaajireen and Ansaar – were still alive, and no one among them objected to that, rather they helped him and agreed with him, and also enjoined it. End quote.
And Allaah knows best.