The Mechaber (151:9) brings the minhag of lighting candles in the Bais Haknesses. This is done to show honor. The Mechaber in Hilchos Yom Tov (514:5) says that it is permissible to light them on Yom Tov, even on the second day after Mincha when Yom Tov is almost over. Since it is a mitzvah for that specific time, it is not considered as if he is preparing for the weekday. The Mishnah Berura explains, not only is it permissible by night when it is necessary for tefillah, even during the day it is permitted since it is for the kavod of the Bais Haknesses.
The Mishnah Berura brings the Magen Avrohom who explains the Mechaber that it may be lit after Mincha even if there is no one there, since it is a kavod for the Bais Haknesses. However in the Biur Halacha he questions the proof the Magen Avrohom brings and is not certain if they may be lit even if no one is there.
The candles should be lit before anyone comes to daven. The Gemara says that where ever a minyan comes to daven, the Shechina is already there before they enter.
On Motzai Shabbos we make a brocha on a fire. It must be a fire that was lit for light. The Mechaber (Siman 298:11) brings two opinions regarding the candles of the Bais Haknesses as to when one may make a brocha on them. The Mishna Berura brings the opinion of the Rosh that today no one makes a brocha on the candles of the Bais Haknesses since they are only lit for kavod and not for light, which is also the reason they are lit the whole day. The Mishnah Berura explains that the Rosh is referring to the candles that are by the amud which are only lit for kavod. However one can make a brocha on the candles that are used for light. [The Biur Halacha brings a machlokes when the candle was lit for both kavod and light if one may make a brocha on it. He is also unsure what the halacha is if a candle was originally lit for kavod and at the end it is only being used for light.]
Many poskim hold, that it is best to use oil or candles by the amud. Others hold that since according to most poskim one can fulfill lighting Shabbos neiros with electricity, the same applies for the neiros at the amud. This seems to be the minhag in most Ashkenazic Battei Knessios. The Chassidim are makpid to light with oil or candles. There are different minhagim how many candles to light.
We mentioned earlier the minhag to have the neiros burning the whole day. Others say they may be put out after davening. This should be done if there is reason to suspect that it may cause a fire. Nevertheless the minhag is to always have one ner burning. This is called the Ner Tamid. It is a remembrance of the Ner Maaravi in the Bais Hamikdash which was always lit. The Medrash says whoever lights the Ner Tamid in front of the Aron Kodesh will be blessed. Many places use electricity for the Ner Tamid. The reason is for fear of a fire starting when no one is there.1
Prepared by R’ Avrohom Yehoshua Ziskind
1Sources: Mishnah Berura, Biur Halacha, Dirshu. Piskei Teshuvos