There is a disagreement between the Rishonim regarding the proper time to light the Chanukah Menorah. The Rambam states that it should be lit at "Shki’at Ha’Hama" (sunset), whereas the Rosh and the Tur hold that the proper time is "Set Ha’kohavim" (nightfall). Maran rules that the Menorah should be lit "Im Sof Shki’ata"-at the end of sunset. The Mishna Berura (Rav Yisrael Meir Kagan of Radin, 1839-1933) and the Ben Ish Hai (Rav Yosef Haim of Baghdad, 1833-1909) understand this to mean nightfall, in accordance with the Rosh and the Tur.
Hacham, Ovadia and Hacham Bension concur that nightfall is 15-20 minutes after sunset. It should be noted that Maran also rules that one should not light earlier or later than the prescribed time. If one lights too early, it is still light outside and the candles are not noticeable. Hacham Bension writes that one should not light later than 50 minutes after sunset Of course, if one missed that time he can still light afterwards, B’diavad-after the fact.
SUMMARY
The preferred time for lighting the Menorah is 15-20 minutes after sunset until 50 minutes after sunset.