The gemara states that the mitzva of Chanuka lights is “a candle to each man and his house” (ner ish u’veito). No mention is made of lighting in shul.
However, many Rishonim from various communities mention the custom to light in Beit Knesset as well, and it seems that this lighting was widespread by the time of the earliest Rishonim (Tur and Beit Yosef OC 671:7). A variety of reasons are given for this custom:
1. This lighting is for the benefit of wayfarers who are put up in the shul, just like saying havdalah in shul (See OC 269).
2. Lighting in the home is meant to create pirsumei nisa, publicizing the Chanuka miracle; lighting in shul is merely an amplification of the same idea (both in Kol Bo).
3. Ideally, Chanuka lights should be lit in or at least towards the public thoroughfare. However, in most diaspora communities Jews were hesitant about lighting in public. The synagogue is a public place, and lighting there is a kind of substitute for lighting towards the street (Rivash).
According to these explanations, the lighting in shul is fundamentally similar to lighting at home. It just happens to be the home, or street, of community members. However, an additional law mentioned in many Rishonim suggests that this lighting has a different character. The Semak mentions that the Chanuka light should be in the southern part of the shul, as a commemoration of the Menora which was in the southern part of the Temple. Trumat HaDeshen extends the likeness even further and says that the arrangement of the individual lights should be in the orientation found in the Temple (north-south according to some authorities, east-west according to others). (All sources as cited in Tur and Beit Yosef OC 671.)
The lighting in shul is also distinguished by the custom to light in the morning – something which is never done at home! This too is explained by many commentators as a commemoration of the Mikdash, where the lights were lit in the morning when necessary (Rambam Temidin u’Musafin 3:10).
It seems natural to us that the Chanuka lights should be viewed as a commemoration of the Temple Menora. After all, they are meant to publicize the miracle of the tiny quantity of oil that illuminated the newly rededicated Beit HaMikdash for eight days. But actually we seldom find this likeness as a factor in other laws of Chanuka. In fact, Rav Kook suggests that we light eight lights at Chanuka specifically to differentiate these lights from the seven-branched Menora in the Beit HaMikdash. (Moadei HaRayah citing Mitzvot Rayah OC 670.)
Evidently this parallel is special to the lighting in shul. Indeed, the Mishna Berura (Shaar HaTziun 671) writes explicitly that the lighting in shul is a commemoration of the Temple.
We can explain this discrepancy as follows. The Chanuka holiday and lighting were initially established in order to celebrate the rededication of the Mikdash in Yerushalayim. It would have been inappropriate to demonstrate our joy at the renewal of the central Sanctuary by making miniature copies in every community! On the contrary, there was then a necessity to distinguish the private lighting from the Temple lighting, as Rav Kook suggests.
However, after the destruction of the Temple, the mitzva assumed a new dimension. As the Jewish people were sent into exile, we all become like wayfarers; likewise, in foreign lands our ability to publicize the miracle to other became limited and there was an increased need to publicize it among ourselves, particularly where Jews gather together. Finally, with the lack of the Temple there arose the need to recall and commemorate it. All of these considerations find expression in the custom to light in shul to honor the wayfarers, to publicize the miracle specifically among Jews, and finally to partially recreate the radiance of the Mikdash in each community.
The words of this author reflect his/her own opinions and do not necessarily represent the official position of the Orthodox Union.