The Rama (Rav Moshe Isserles of Cracow, 1530-1572), in discussing the laws of mourning, addresses the question of whether or not a mourner is permitted to attend a wedding in a Bet Kenesset (synagogue). Irrespective of his ruling, it appears from the Rama’s discussion that it was customary in his time to conduct weddings in synagogues.
However, the Tiferet Yisrael (Rav Yisrael Lipschitz, Germany, 1782-1860), in the introduction to his commentary to Seder Mo’ed, asserts that the Rama did not actually write this. He notes that the source of the Rama’s comment is the Hagahot Oshri (Rav Yisrael of Krems, Austria, 14th-15th century), who speaks of a mourner attending a wedding in a Bet Ha’nesu’in – a wedding hall. Undoubtedly, the Tiferet Yisrael writes, when the Rama was citing this passage, he referred to wedding halls, and not synagogues. Evidently, the Rama wrote the abbreviation "Bet" "Heh" which he intended to represent the term "Bet Ha’nesu’in," but a copyist mistakenly understood that the intent was to a "Bet Ha’kenesset." The Tiferet Yisrael dismisses out of hand the notion that the Rama sanctioned holding weddings in synagogues, which violates the prohibition against imitating the practices of other religions, as people of other faiths hold weddings in their chapels. This position was also taken by the Hatam Sofer (Rav Moshe Sofer of Pressburg, 1762-1839).
This was also the position of Rav Haim Hizkiya Medini (1834-1904), in his Sedeh Hemed (Ma’arechet Hatan Ve’kalla, 1). He strong denounces the practice of holding weddings in synagogues, for several reasons. One reason is because of the custom that was observed in some communities that women do not come to the synagogue when they are in a state of Nidda. (This custom is brought by the Rama.) Hacham Ovadia Yosef refutes this contention, noting that the widespread practice is not to follow this custom.
In any event, the Sedeh Hemed’s position is followed by Hacham Ovadia Hedaya (1889-1969), in his work Yaskil Abdi (vol. 6, E.H. 1). He notes that one of the Sedeh Hemed’s concerns was that men and women might mingle at the wedding, which would constitute a violation of the sanctity of the synagogue. Hacham Ovadia Hedaya writes that if the Sedeh Hemed was concerned about inappropriate mingling in the synagogue a century ago, then this is certainly a serious concern in our generation, when modesty standards have drastically declined. And although Hacham Aharon Ben Shimon (Egypt-Israel, 1848-1928) specifically pushed for weddings to be held in synagogues, Hacham Ovadia Hedaya writes that this was only because people in his community in Egypt were conducting weddings in places with statues. If a choice must be made between such a place and a synagogue, then certainly the wedding must be held in the synagogue. But as a matter of general practice, Hacham Ovadia Hedaya ruled, weddings should not be held in synagogues.
Hacham Ovadia Yosef addresses this topic in his Yabia Omer (vol. 3, E.H. 10), where he concludes that those who wish to host a wedding in a synagogue may do so, if several conditions are met – men and women sit separately, and there is no frivolous conduct, no idle chatter, and no hugging and kissing. All these activities are strictly forbidden in a synagogue, and so they must be avoided. If these measures are adhered to, then there is room to allow weddings in synagogues. This ruling is noted also by Hacham Ovadia’s son, Hacham David Yosef, in his Halacha Berura.
It must be emphasized that weddings in synagogues are permitted, not encouraged. There is no special Misva whatsoever to conduct a wedding in a synagogue. There is some question whether it is allowed, but according to no opinion is it preferable to have a wedding in a synagogue as opposed to a different venue.
Summary: Contrary to what many might think, there is no preference to holding a wedding in a synagogue over other venues. In fact, a number of Poskim strongly condemned the practice of holding weddings in synagogues. According to the accepted Halacha, weddings in synagogues are allowed as long as men and women remain separate and proper decorum is maintained, but there is no halachic advantage whatsoever to conducting a wedding in a synagogue.