At the beginning of this Parsha, the Torah introduces some details concerning the oil to be used for kindling the Menorah in the Mishkan (שמות כ"ז:כ'). Making reference to this Posuk (שם), the Gemara in Shabbos (.דף כ"א) draws an equation between the kindling of the lights in the Beis HaMikdash (and the Mishkan) and the kindling of lights for Shabbos, stating that whichever types of wicks and oils may not be used for kindling the Shabbos lights may also not be used for kindling the lights in the Beis HaMikdash (and the Mishkan). The types of wicks and oils excluded from use for the Shabbos lights are listed by the Mishnayos in Masheches Shabbos (פרק ב' משניות א'-ג') and elaborated upon by the Gemara there (דף כ:-כ"ט:); the Rambam (פרק ה' מהל' שבת הלכות ה'-י"א) and the Shulchan Aruch (אורח חיים סימן רס"ד סעיפים א'-י') rule accordingly, explaining some of the details. It would thus seem that these types of wicks and oils could not be used in the Beis HaMikdash (or the Mishkan), as the Rambam (פרק ג' מהל' תמידין ומוספין הלכה ט"ו) indeed accepts this equation between Shabbos and the Beis HaMikdash.
It is worth noting, as pointed out by Torah Temimah, in his commentary on the Posuk in our Parsha (שם אות כ"ח), that this equation is really necessary only to exclude certain wicks from use in the Beis HaMikdash, since all oils, other than absolutely pure, pressed olive oil, are already excluded from use there anyway, based on the Posuk in our Parsha (שם) which states that only such pure olive oil may be used to kindle with in the Mishkan (and, eventually, in the Beis HaMikdash). The Mishnayos in Menachos (both on דף פ"ו.) as well as the Gemara there (שם ובעמוד ב' שם) elaborate on this point, and the Rambam (פרק ז' מהל' איסורי המזבח הלכה ח',י') rules accordingly. The Torah Temimah (םש) then notes that there is in fact one version of the text of the aforementioned Gemara in Shabbos (םש) according to which only wicks are even discussed there, presumably for the above reason; this indeed seems to be the version of the text according to Rabbeinu Chananel, in his commentary on that Gemara (םש). It is also worth noting that according to the Rambam cited above (הל' תמידין ומוספין שם), it is only for lighting the Menorah that certain wicks may not be used, while, apparently, for kindling other lights in other situations in the Beis HaMikdash, any wicks may be used; the Kessef Mishneh (םש) explains what the source is for this. The Torah Temimah (םש) indicates that for other lights in the Beis HaMikdash, any other oils may also be used; it is thus only for the Menorah and for Shabbos lights that there are many restrictions concerning the wicks and oils that may be used.
The Gemara later in Shabbos (דף כ"ה:) states that kindling lights for Shabbos is obligatory. Rashi (שם בד"ה חובה) indicates that this is a manifestation of כבוד שבת, honoring the Shabbos, since, as noted by the Gemara in Yoma (דף ע"ב:), a significant meal, such as the one eaten on Friday nights, is not really special without lights. The Rambam (פרק ל' מהל' שבת הלכה ה') likewise writes that lighting candles for Shabbos is a means of honoring the Shabbos, as do the Semag (מצות עשה ל') and the Sefer Yereyim (סימן תכ"ט), while the Hagahos Maimoniyos (פרק ה' מהל' שבת אות א') quotes a view that the Beracha recited on the candles in fact mentions כבוד שבת. According to Tosafos (שם בד"ה הדלקת), though, the purpose of lighting candles for Shabbos is to enhance עונג שבת, the pleasure of Shabbos, since the requirement is to light the candles where one will be eating in order to increase the enjoyment of the meal and hence, of Shabbos. This view is also implied by the Midrash Tanchuma in Parshas Metzora (אות ח'), and it is the position presented by the Rambam earlier (פרק ה' מהל' שבת הלכה א') where he specifically mentions עונג שבת. The Aruch HaShulchan (או"ח סימן רס"ג סעיף ב'), among others, takes note of the apparent contradiction between the two statements of the Rambam, the one connecting Hadlokas Neiros to כבוד שבת, and the other connecting it to עונג שבת, as presented above, and he suggests that really both statements are correct; lights kindled in the place where one eats are kindled to honor the Shabbos, while those lit elsewhere in the house are lit to enhance the pleasure of the Shabbos, since they assure that one won't fall and get hurt when walking around. The Pri Megadim (במשבצות זהב לאו"ח סימן רס"ד ס"ק א') also writes that Hadlokas Neiros for Shabbos is a fulfillment of both the requirement to honor and that to enjoy the Shabbos; the Sefer Shemiras Shabbos KeHilchosoh (חלק ב',פרק מ"ג הערה ו') also accepts this position, documenting it in some detail and stating that the way to honor the Shabbos is to enjoy it, and not to just sit in the dark at the meal, and so both results are really produced by lighting the Shabbos candles.
The Gemara earlier in Shabbos (דף כ"ג:) indicates, according to the interpretation of Rashi (שם בד"ה נר), that the Shabbos candles generate שלום בית, peace in the household; Rashi then adds (שם בד"ה שלום) that people find it unpleasant to sit in the dark, referring to the later Gemara there (שם דף כ"ה:) that cites a Posuk in Eichah (ג':י"ז) which is understood to mean that Hadlokas Neiros for Shabbos produces peace. Rashi there (שם בד"ה הדלקת) explains that there cannot be true peace and tranquility in a place without any light, because one will stumble and walk around in darkness. It is worth noting that both the Bach (הגהות הב"ח שם אות ג') and the Maharshal (חכמת שלמה שם בד"ה רש"י) state that according to some, Rashi (םש) is referring to eating in the darkness, implying that true שלום בית is manifested when people are able to eat together in the light; the Shibolei HaLekket (סימן נ"ט) stresses the connection between the Shabbos candles and the ability to eat in the light, as does the Rashba in Shabbos (חדושי הרשב"א לדף כ"ג: שם בד"ה הא דאמר רבא), among others. The Mordechai in Shabbos (סימן רצ"ד, דף ע"ב. בדפי הרי"ף), though, states clearly that the purpose of having candles lit for Shabbos is to maintain שלום בית which would otherwise be hampered when people would trip over wood or stones in the dark; similarly, the Pri Megadim (באשל אברהם לאו"ח סימן רס"ג ס"ק ט') states that even if one is eating somewhere outside one's house, having candles lit inside the house is of primary significance because of שלום בית, implying that the meal is not the focal point of this Halacha. This relationship between Shabbos candles and שלום בית is found as well in a later Gemara in Shabbos (דף ל"ד.), and is mentioned in the Shulchan Aruch (או"ח שם סעיף ג' וכן בסימן תרע"ח שם סעיף א'); the Magen Avraham (שם סימן רס"ג ס"ק י"ג) as well as the Mishnah Berurah (שם ס"ק מ"ו) discuss whether it is the ability to eat the Friday night meal in the light or the ability to avoid tripping and stumbling that primarily generates the obligation to light candles for Shabbos.
It is clear in any case that there is an independent obligation to kindle lights for Shabbos; the Ramo (שם סעיף ד') thus rules that even if one already has lights kindled in his home from beforehand, he should nonetheless kindle additional lights for the honor of Shabbos, extinguishing those that are already lit, if necessary, a ruling perhaps rooted in a Tosafos in Shabbos (דף כ"ה: בד"ה חובה) where other views on this issue are cited. HaRav Hershel Schachter (ספר נפש הרב, ליקוטי הנהגות או"ח, הדלקת נרות אות ג') reports that according to HaRav Yosef Dov Soloveitchik, it is proper to turn off all the electric lights prior to Hadlokas Neiros, then light the candles, turn on the electric lights and then recite the Beracha on Hadlokas Neiros. It is also permissible to light extra candles for Shabbos, and to recite the proper Beracha over each of them, as implied by the Shulchan Aruch (שם סעיף ח' ועיין שם ברמ"א); the Mishnah Berurah (שם ס"ק ל"ה, ל"ז) and the Kaf HaChaim (שם אות נ"ו) concur. The Magen Avraham (שם ס"ק א') and the Mishnah Berurah (שם ס"ק ב'), among others, write that one should really have lights kindled in every room which one wishes to use during that Shabbos; the Mishnah Berurah elaborates on this in his Biur Halacha (שם בד"ה בחורים). Some of the above rulings may depend on what the main reason behind the obligation to light Shabbos candles really is. It should be noted that the implication of the Midrash Tanchuma in Parshas Noach (אות א') is that the Mitzvah to light candles for Shabbos is a Mitzvah MideOraisa; this is clearly the position of the Behag (ספר הלכות גדולות, סדר מנין המצות, מצות קום עשה קל"ח) and may also be the position of the Sefer Yereyim cited above (םש). The Rambam, however (פרק ה' מהל' שבת הלכה א'), writes clearly that it is a Mitzvah MideRabbanan, and the Rashba (שו"ת הרשב"א חלק ד' סימן רצ"ה), apparently concurs, and this seems to be the majority position.
The simple reading of the Mishnah in Shabbos (דף ל"ד., וכן במשנה בדף ל"א: שם) indicates that the primary Mitzvah is to light one candle for Shabbos; the Mishnah Berurah (שם ס"ק כ"ב), citing the Pri Megadim (באשל אברהם שם ס"ק י"א), states this clearly, as does the Kaf HaChaim (שם אות ל"ח). The Mishnah Berurah elsewhere (שם סימן ל"ה) writes, however, that the more light there is, the greater the level of שלום בית and gladness to be enjoyed in every corner of the house is; the Kitzur Shulchan Aruch (חלק א' סימן ע"ה סעיף ב') writes that there is in fact a Mitzvah to kindle many lights in the house in honor of Shabbos, and this seems indeed to have been the practice of the Vilna Gaon, as reported in the Sefer Maaseh Rav (סימן קי"ב). The Kitzur Shulchan Aruch (םש) mentions that some have the practice to light ten candles, while others light seven, and he concludes that one should try not to have less than two, one corresponding to the word "זכור," the word used in the Torah requiring us to remember the Shabbos (שמות כ':ח'), and the other corresponding to the word "שמור," the word used in the Torah requiring us to observe the Shabbos (דברים ה':י"ב). The Shulchan Aruch (או"ח שם סעיף א') mentions the practice of lighting two candles for the above reason, presented as well in the aforementioned Shibolei HaLekket (םש) and elsewhere; the Kaf HaChaim (שם אות ד') mentions several other reasons for this practice. The Ramo (םש) adds that some people light three or four candles, despite indicating in his Darkei Moshe on the Tur (שם אות א') that it may not be proper to light more than two, a point discussed as well by the Chasam Sofer (שו"ת חתם סופר חלק או"ח סימן ע"ה). The Magen Avraham (שם ס"ק ב') mentions the practice of lighting seven or ten candles, and the Mishnah Berurah (שם ס"ק ו') explains that the seven candles correspond to the seven days of the week, while the ten candles correspond to the Aseres HaDibros. The Sefer Shemiras Shabbos KeHilchosoh (שם הערה י') records a custom to light one additional candle for each child in the family, adding one to the total every time another baby is born; although this is a widespread practice, the source for it seems to be somewhat unclear. It appears from the Pri Megadim (באשל אברהם שם ס"ק ג') that once one is accustomed to lighting a certain number of candles, one should not ever light less than that; according, however, to the Sefer She'arim HaMetzuyanim BeHalacha, commenting on the Kitzur Shulchan Aruch (שם ס"ק י"ג), as well as according to Rav Gedalyah Felder, in his Sefer Yesodei Yeshurun (מערכת הלכות שבת, מערכת נר שבת, מספר הנרות בבית), the necessity to maintain one's custom of lighting additional candles is only when one is at home, but if one is away, one may conform to the usual custom of lighting only two candles.
The implication of the Gemara in Shabbos (דף כ"ג: ועיין שם בתוד"ה ה"ג) is that the obligation to light Shabbos candles applies to both men and women, and the Rambam (הל' שבת שם) and the Shulchan Aruch (שם סעיף ב') rule accordingly; the Shulchan Aruch HaRav (שם סעיף ט"ו, ועיין שם בקונטרס אחרון אות ה') explains, though, that the Mitzvah pertains to the household as a whole, not to the individuals. Nevertheless, it is clear from the Mishnah later in Shabbos (דף ל"א:) that women have a special responsibility regarding this Mitzvah, and the Baal HaTurim on the Posuk in our Parsha (שם בד"ה תצוה) finds a hint to this idea in the Torah itself. The Rambam (שם הלכה ג') rules that women have a greater obligation in this Mitzvah then men because they are in the house more and are generally more involved in household matters, and the Shulchan Aruch (שם סעיף ג') mentions this idea as well. The Yerushalmi in Shabbos (פרק ב' הלכה ו', דף כ.), as well as the Midrash in Bereishis Rabbah (פרשה י"ז סימן ח') and the aforementioned Midrash Tanchuma in Parshas Noach (םש), all quote another reason for this, connecting it to the actions of Chavah; this reason is cited by the Tur (או"ח שם) and by the Magen Avraham (שם ס"ק ז'), as well as by the Mishnah Berurah (שם ס"ק י"ב), who adds that the husband should nevertheless have some involvement in this Mitzvah, such as by setting up the candles. The Mishnah Berurah (שם ס"ק י"א) also notes that the wife has priority in this Mitzvah even if the husband wants to light; the Aruch HaShulchan (שם סעיף ז'), among others, concurs, saying that the wife can actually prevent the husband from lighting the candles.
The Maharil (ספר מהרי"ל, הל' שבת, דף כ"ט. בהערה) writes that if a woman forgets to light candles on a given Shabbos, she is required to add an extra candle and light it each week from then on. The Ramo, in the aforementioned Darkei Moshe on the Tur (םש), questions this idea, but concludes that such is indeed the custom, and he codifies this ruling in the Shulchan Aruch (שם סעיף א'). The Magen Avraham (שם ס"ק ג') notes that if she forgets Hadlokas Neiros more than once, she has to add a new candle for each week she misses, but he then states that this is required only if she was negligent and did not light, but if she couldn't light due to some pressing, unforeseen circumstance (אונס), she need not add a candle every week in such a case. The Mishnah Berurah (שם ס"ק ג') agrees to this as does the Kaf HaChaim (שם אות י'), who adds that if a woman could not light because she couldn't afford a candle, she too need not add a candle in subsequent weeks. The Sefer Shemiras Shabbos KeHilchosoh (שם הערה ל') questions whether the fact that electric lights were lit in the house makes a difference or not in terms of her requirement in future weeks. It should be noted that as presented in the Shulchan Aruch (שם סעיף י'), some hold that as soon as the candles have been lit, one has automatically accepted Shabbos and all its Halachos; the Ramo (םש) writes that this is certainly the case for the woman who lights, unless she specifically stipulates otherwise (even mentally), although it is not true for the other members of the household.