The mitzvah to light Shabbat candles derives from the Talmud: Rabbi Yehuda says, "Lighting a candle for Shabbat is not optional and is way of honouring the Shabbat" (Shabbat 25b).
Before electricity, Shabbat candles ensured that there would be some light in the house during the Shabbat and that no one would sit in darkness. In fact, one may actually use electric lights as one's Shabbat candles as they serve the same purpose: bringing peace to the home through light.
The Talmud does not designate women as the main lighters, but that is how the mitzvah has evolved. As women have traditionally run the household, they are responsible for seeing to the light on Shabbat.
Of course, Shabbat candles are not only about not tripping over your furniture. Light symbolises clarity, Torah and redemption. So, the Talmud teaches that if we light Shabbat candles, our children will be enlightened with wisdom.