The gemara (Shabbos 23b) says, "הרגיל בנר הווין ליה בנים תלמידי חכמים". One who religiously fulfills the mitzva of the candles will merit children who are Talmidei Chachomim. Rashi says "Ner" means Ner Shabbos and Ner Chanukah. What is the connection between these Neiros and good children?
Rav Avrohom Abba Weingart (Gachalei Eish on Hagadas Sridei Eish) explains that Ner Shabbos and Ner Chanukah come to address two fundamental different issues. Ner Shabbos is the symbol of Shalom Bayis. It represents a person's attitude and behavior behind the closed doors of his private life. How much light he shines in his own home speaks volumes of his behavior when he is not on the public stage and drops his guard. Ner Chanukah on the other hand is all about Pirsumei Nisa, the face that one shows to the public.
In order for a person to properly raise his children, he must radiate both these two faces. If he puts on a righteous public demeanor, yet doesn't live up to it in his own home, while he may fool himself and the whole world, his children will not be fooled. On the other hand if he acts as a true Ben Torah in his own home, but in public he is embarrassed to show his true face and adapts himself to the level of society around him, his children will get the impression that the Torah lifestyle is something to be ashamed of, and will not choose it as their own path in life.
With these two lights, the light of Shabbos which is the light of a fine home, as well as the light of Chanukah which proudly projects its own light onto a dark world, one is assured that his children will grow to be true Bnei Torah and exemplary Jews.