As for the issue of which is better: to pray Taraweeh at home or in the masjid, then there is a difference of opinion among the People of Knowledge. Some of the Salaf and Scholars were of the opinion that praying at home is better, whereas others said praying in the masjid is better. For example, Imam Marwazi mentions in his book Mukhtasr Qiyaam Layl wa Ramadan wal-Witr that some of the Salaf took the view of praying alone at home (pg. 230-232).

However, the preferred opinion of the majority of the people of Knowledge is to pray in the masjid with congregation.

Ibn Abdul-Barr [may Allah have mercy upon him] said: “The people of knowledge have differed into two well-known opinions, regarding what is better: praying in the Taraweeh in the house or in the congregation. The majority took the opinion, like Ahmad, Ishaaq, Ibn al-Mubarak, and other than them, that praying in the congregation is better. Malik and Shafi’ee took the opinion that praying in the house alone is better. Other than them like Hasan al-Basri took the opinion that the place in which he finds khushoo’ and more softness of the heart is better to pray in”

[Istithkaar (2/70) as seen here]

Imam Nawawi [may Allah have mercy upon him] said:

“The Taraweeh prayer is Sunnah according to the consensus of the Scholars…it is allowed to pray it alone or in congregation. Which of them is better? There are two well known opinions and what is correct according to the our companions [the Shafi’yyah] is that the congregation is better. The second opinion is that praying alone is better. Our companions said the difference of opinion is regarding one who memorized the Quran, is not afraid being lazy regarding [the Taraweeh prayer] if alone, and there is no differing [that occurs] in the masjid due to him being absent [from the congregation]. If one of these three affairs is missing, then the congregation is better without dispute”

[al-Majmoo’ (3/526) as seen here]

Ishaq [may Allah have mercy upon him] said: I said to Ahmad: prayer in congregation is more beloved to you or praying alone in the Qiyaam in the month of Ramadan? He said: It pleases me that he prays in congregation and revives the Sunnah. Ishaq said: Like this he said”

[Qiyaam Ramadan Marwazi and Masaail Abi Dawood li Imam Ahmad as seen here]

Imam al-Albani (may Allah have mercy upon him) said:

“[Praying in] congregation for the Qiyaam in Ramadan is legislated, rather it is better than pralbaaying alone, due to the Prophet (ﷺ) establishing it himself and clarifying its virtue by his statement:

مَنْ قَامَ مَعَ الْإِمَامِ حَتَّى يَنْصَرِفَ كُتِبَ لَهُ قِيَامُ لَيْلَةٍ

Indeed, whoever stands (praying) with the Imam until he finished, then it is recorded for him that he prayed the whole night

[Qiyaam Ramadan pg. 19-21  as seen here]

So while it is allowed to pray Taraweeh at home, it is better to pray in the congregation and it is closer to the Sunnah.

And Allah Knows best

Faisal Ibn Abdul Qaadir Ibn Hassan
Abu Sulaymaan