Paragraph 5 of Section 263 notes a view that one should not recite a blessing when lighting candles in celebration of the Day of Atonement. If one thinks about this it makes sense: the lighting of candles was instituted by the sages in order to ensure Oneg Shabbat (or Oneg YomTov), that the day be celebrated as a time of joy and lightness, that the festive meal not be eaten in the dark, and so forth. Yom Kippur is hardly a day on which we should find Oneg [delight]; indeed, one of its major ceremonial characteristics is deprivation of pleasure: we do not eat, drink, bathe and so forth. (As the Shulĥan Arukh itself notes, this consideration is to be ignored when Yom Kippur coincides with Shabbat. However, the general custom observed nowadays is to recite the appropriate blessing when lighting the candles for Yom Kippur, which is an indication of the extent to which the lighting of candles has lost its original practical function and become a ceremonial ritual.
8:
In the additional note that concludes this paragraph Rabbi Moshe Isserles notes that there is a maĥloket [difference of opinion] among the poskim [halakhic authorities] as to when the berakhah should be said when lighting the Shabbat candles. When we are about to perform a mitzvah we usually recite the blessing first and then immediately begin to carry out the mitzvah. This would suggest that we should first recite the blessing and then proceed to light the candles. However, there is a logistic problem here which has been noted by many poskim. Reciting the blessing is a sign that one has accepted upon oneself the sanctity of Shabbat; that means that all the requirements and restrictions that characterize the day are immediately operational. In Shabbat 009 we quoted the famous mishnah which enumerates the thirty-nine prime actions which may not be done on Shabbat, one of which was that we may not kindle a light or a fire. Thus we have a quandary: how can we recite the blessing and then kindle the candles when the kindling itself becomes prohibited the moment we recite the blessing?
9:
One view is that nevertheless the blessing should be recited before lighting the candles; the other view is that the blessing should be recited after lighting the candles. Rabbi Isserles in his note brings the rather quaint solution to the quandary that has become almost universal practice. The rationale would be that we are not required to light candles for Shabbat; we are required to have candles alight during Shabbat. When we studied the first paragraph of Section 263 we noted the rather convoluted expression used to describe the mitzvah: "Both men and women must have a light burning in their homes on Shabbat". Thus the mitzvah is to enjoy the light that the candles shed for us, and the lighting is merely preparation for the mitzvah, however essential.
10:
Thus the accepted practice now is as follows: we light the Shabbat candles; then we shield the light that they shed from our eyes by placing our hands between them and our eyes; now we recite the berakhah; having recited the berakhah we remove our hands and look at the light shed by the candles, thus permitting them to fulfill their function for the first time on that Shabbat: to shed for us light and joy. This method of lighting the Shabbat candles is described by Rabbi Ya'akov Möllin who died in the year 1427; so it must be at least 600 years old - and probably a lot older!
11:
None of this is necessary when lighting the candles for YomTov (which does not coincide with Shabbat). The kindling of a light is not prohibited on YomTov and therefore there is no reason why the berakhah should not precede the lighting. Obviously, when YomTov coincides with Shabbat the practice described in #10 above must prevail.