It is a mitzva to have light in every room that will be used Friday night, so that people will not trip. However, the primary mitzva is to light the candles where the meal will be eaten, since by eating the meal by their light, they increase the honor and pleasure of Shabbat. Therefore, the berakha is recited over these candles (Rema 263:10; MB ad loc. 2). If the other rooms have light thanks to electric lights in the home or streetlights shining in, there is no need to light candles there as well.
The candles must remain lit until the end of the Friday night meal. Ideally one should make sure that light remains until people go to sleep (SSK 43:17). Today, when one can easily leave on electric lights, ideally one should make sure that there is light in the house all night, so that one who wakes up during the night does not trip.
The mitzva to light candles applies to all Jews, men and women, single and married, since everyone is obligated to honor and enjoy Shabbat. However, within the family the wife takes precedence for this mitzva, because she is the ba’alat ha-bayit (mistress of the household) and responsible for running it. Therefore she has the privilege of fulfilling this mitzva, which is designed to ensure peace in the home. She exempts all other members of her household with her lighting. But if the wife is running late and it is getting close to shki’a, it is better that her husband or one of the children light the candles so that she does not risk desecrating Shabbat by lighting the candles herself (SA 263:2; MB 262:11).
The precedence of women over men with regard to candle lighting indicates that shalom bayit is primarily dependent on women, and the light of Torah and faith permeates the home due to the wife. Through her special inner awareness she knows how to illuminate the path of faith for her husband and children, and she directs them toward diligent Torah study. This accords with the words of the Sages: “The promise [of future reward] for women is greater than that of men,” because they send their children to study Torah in school, encourage their husbands to study long hours in the beit midrash, and wait for them to come home (Berakhot 17a). Nevertheless, when the wife is unable to light the candles, the husband should do so, for when necessary he too can bring peace to the home and introduce an atmosphere of faith and Torah to it.
One whose wife is away for any reason while he remains at home must light the candles with a berakha. Even if he has an adult daughter, the mitzva to light the candles devolves upon him, because he is the head of household. If he wishes, though, he may ask his daughter to light for him and the rest of the household (SSK ch. 43 n. 46).
Some have the custom that all the girls in the household who are old enough to understand the mitzva light candles with a berakha along with their mother. This is custom of Chabad. However, most poskim maintain that only the mother of the family should light, and that is the custom of all other Jewish communities. It is proper for every woman to follow her family custom.