It is well know that there is a disagreement whether one should light Channuka candles at sunset or at tzet hakochavim. However, the basis for this disagreement is less known, and this I will try to clarify.
The Gemara (Shabbat 21b) states that one should light candles "mishtishka hachama". This expression appears in other places in shas as well including in the sugyot pertaining to Bein Hashemashot and Tzet Hakochavim. As is well know, there is a disagreement between Rabbeinu Tam and the Gr"a regarding the time of tzet hakochavim. Part of this disagreement includes the question of how to explain the phrase mishtishka hachama. Rabbeinu Tam (in Sefer Hayashar) explained that it refers to tzet hakochavim, and therefore he stated that channuka candles should be lit at tzet hakochavim. The Shulchan Aruch (OC 672:1) ruled like Rabbeinu Tam and therefore also stated that channuka candles should be lit at tzet hakochavim. However, the Gra explained that "mishetishka hachama" refers to sunset, and therefore concluded that channuka candles should be lit at sunset. In essence, this means that the question of whether to light channuka candles at sunset or at tzet hakochavim is dependent on the machloket of whether tzet hakochavim is when the Gra stated, or when Rabbeinu Tam stated.
Therefore, since the custom in the great majority of Jewish communities nowadays is to follow the opinion of the Gra in regards to tzet hakochavim (and rightfully so, as the proof of the Gra is very strong), the proper time to light candles for them is at sunset.