According to many poskim (halachic decisors), including Hacham Ovadia zatzal (of blessed memory), electricity is satisfactory for fulfilling the obligation of Hadlakat Nerot Shabbat (lighting Shabbat candles). Many people like to do it the traditional way and light a fire, but in certain circumstances, a person can use electricity to fulfill their obligation. The logic is that we need light in the home; that's the purpose of lighting candles. However a person gets that light, it would be sufficient to satisfy the need for shalom bayit (peace in the home), so a person can function properly.
There were some poskim who even preferred electricity over fire because a person was less likely to tamper with it, and it lit much better. Sometimes you have types of oils and wicks that don't light so well, and a person could play around with them and come to violate an issur (prohibition). But electricity is nice and clear, so many poskim even preferred it. Many people light with fire, though, and then, if they need to, they use electricity.
This is different from havdalah (separation), where we want to have a flame to represent the fire that Adam HaRishon made on Motzei Shabbat (after Shabbat). It cannot even be behind glass in a bulb; that would not be satisfactory. It's even more different from lighting the Hanukkah candles, where we want to reflect what was in the Beit HaMikdash with wicks and oils and a real flame. So there, too, electricity is not usable, but for Shabbat, it is usable.
Two points come out of this. Number one, the poskim write that if a woman, for whatever reason, forgot to light Shabbat candles on a given Shabbat, she'd be penalized by having to light an extra candle to make up for the week she forgot. However, Hacham Ovadia writes that today, that's only a matter of a week. However, Hacham Ovadia writes that today, that's almost not a non-issue. Why? He says that most people still have electricity on in their home, and as long as they have electricity on in their home, they could say they relied on electricity for the Hadlakat Nerot Shabbat, even though they didn't make a Beracha (blessing) and light it. They could rely on that, and therefore the penalty would not necessarily be applied.
Additionally, when a woman lights Shabbat candles, she should preferably shut the lights in the room. If there's already electricity on, which is satisfactory for Hadlakat Nerot, then her candles are just adding. Hacham Ovadia writes that she should shut the lights, light the candles properly, and then afterwards she can turn the light back on.
Now you might ask, “Rabbi, after I lit Shabbat candles, how can I turn the light back on?” Stay tuned for tomorrow's halakha (Jewish law), where we'll talk about accepting Shabbat with the lighting of the candles.

