Halacha requires lighting candles in the home before the onset on Shabbat every Friday. The Sages enacted this obligation in order to ensure the presence of "Shalom Bayit" – a sense of serenity in the home – on Shabbat. Without light, people are generally tense and anxious; the presence of light brings a feeling of calm, contentment and tranquility which characterizes the desired atmosphere we are to create in the home on Shabbat.
The Shabbat candles should be lit by the woman, who recites a Beracha either just before or just after lighting the candles. It should be noted, as an aside, that both practices are acceptable. The Ben Ish Hai (Rav Yosef Haim of Baghdad, 1833-1909) rules that one should light and then recite the Beracha, whereas from the Shulhan Aruch it appears that one should recite the Beracha before lighting. Hacham Ovadia Yosef follows the Shulhan Aruch's position, as did Hacham Ben Sion Abba Shaul (Israel, 1923-1998), though Hacham Ben Sion added that a woman whose mother followed the Ben Ish Hai's position should continue that practice.
An interesting question arises concerning the status of electric lights with respect to this obligation. Since the purpose of this Misva is to provide light in the home, can one fulfill the obligation by turning on the electric lights in his home? Moreover, if one's home is already illuminated, how can he recite the Beracha over the lighting of the candles, which contributes a negligible amount of light to the home?
Hacham Ben Sion, in his work Or Le'sion (vol. 3, p. 189, and vol. 2, 18:13), writes that one does not fulfill the obligation of Shabbat candles with electric lights because the "fuel" is not present at the time of lighting. When a person lights a candle, all the wax or oil needed to sustain the flame is already present. An electric lamp, however, is sustained by the electric current that is constantly being fed into the lamp. Since that current is not present at the time of lighting, one cannot use such a light for this obligation. Hacham Ben Sion contends that this would be analogous to an oil lamp that has just several drops of oil, and into which one slowly pours oil drop by drop. Clearly, one cannot recite the Beracha over lighting in such a fashion, since the fuel needed to sustain the flame for the required period is not already present. Likewise, according to Hacham Ben Sion, one cannot fulfill the obligation of Shabbat candles with an electric light.
By the same token, one may recite a Beracha when lighting candles in a room that already has illumination from electric lights. Since those lights are not suitable for the obligation of Shabbat candles, the candles are needed for the fulfillment of the Misva, thus warranting a Beracha.
Of course, if we follow this rationale, we would allow using a battery-operated light for this Misva. As Hacham Ben Sion notes, in the case of a battery-operated light all the power is already contained in the mechanism, and it would therefore suffice for the obligation of Shabbat candle lighting. By extension, then, if one has battery-operated lighting in his home, he should extinguish those lights before kindling the Shabbat lights.
Hacham Ovadia Yosef, in his work Yabia Omer (vol. 9), disagrees, and rules that in principle, one can, in fact, fulfill the obligation with electric lights. Since when all is said and done electric lights have the effect of providing illumination, they suffice for this Misva regardless of the fact that the source of power is not currently present.
This ruling has numerous ramifications. For example, if a person spends Shabbat in a hotel or hospital, where he is not permitted to kindle a flame, he may turn on an electric light before Shabbat in fulfillment of the obligation to light Shabbat candles. (Rav Aharon Kotler is likewise reported to have taken this position.) Similarly, if a person spends Shabbat in somebody else's home, and is given a room to which he has exclusive access, he may turn on a closet or bathroom light to fulfill the obligation of Shabbat candles.
Summary: Different views exist as to the status of electric lights with regard to the obligation of Shabbat candles. Whereas Hacham Ovadia Yosef maintained that one may, in fact, fulfill his obligation with electric lights, Hacham Ben Sion Abba Shaul held that one may not fulfill the obligation with electric lights, unless they are battery-operated.