Our hachamim (sages) instituted that, before Shabbat begins, we light candles that will provide us with light throughout Shabbat. This is known as the mitzvah (commandment) of Hadlakat Nerot (candle lighting), and a Beracha (blessing) is recited with it. Even though the mitzvah is midrabbanan (rabbinic), Hashem commanded us and sanctified us to listen to the hachamim, and any hachamim institutions that they make, we are supposed to listen to as well. That's why we make the Beracha.
Some theorize that, throughout history, the mitzvah of Hadlakat Nerot was an attack on certain groups that didn't believe in Torah Shebe'al Peh, didn't believe in the oral Torah, and so they would learn the Torah literally: that you're not allowed to have any fire in your home at any point during Shabbat. So the hachamim instituted a mitzvah that candles be lit beforehand, so that a person has light when it goes into Shabbat. This way, the person can enjoy Shabbat. This is what the rabbis call Shalom Bayit, that there's peace in the home. There's also the symbolism of Torah being there in the home, and the candles provide a certain peace and tranquility that a person could enjoy.
This mitzvah has, throughout the generations, been given specifically to the women, who are in charge of the household or are usually found at home at that time. The rabbis also say that when Chava sinned and gave the Etz HaDa'at to Adam, she extinguished his light. Therefore, as a tikkun, as a repair for that, women typically are the ones who light the candles. However, the mitzvah is not exclusively for women. If you have a young man who is, let's say, living in his own apartment, or if he's on vacation with a group or friends, he still has a mitzvah to go ahead and light candles. If a woman is pregnant and she's in the hospital giving birth, and the husband is home alone with the rest of the family, he has the mitzvah to go ahead and light. So even though, when a married woman is present, usually the mitzvah is given to her to perform for the household, it's not exclusively hers. If a man is on his own, if he's traveling, or in other scenarios, there's still a mitzvah to go ahead and perform Hadlakat Nerot with a Beracha. Have a great day.

