A while ago I read that the blessing over the shabat candles is not in the Talmud (where you can find the other blessings, e.g., the one for bread), so I have tried to find out where the blessing comes from. For the record, the blessing goes like this:
Blessed are You, God, our Lord who has sanctified us with His commandments and commanded us to light the Sabbath lamp.
You can find it in any book on Judaism and also in the halacha codes, for example in the Mishne Tora (R. Moshe ben Maimon, published between 1170 and 1180; Hilchot Shabat 5:1) or the Shulchan Aruch (R. Yosef Karo, published 1565; Orach Chaim 263:5) to name two.
Wikipedia along with some other webpages says that the blessing is from the 11th century, first described by Rashi’s granddaughter:
In Europe, Jewish women lit Shabbat lamps without a blessing until the 11th century. At that time, a blessing was introduced based on the blessing over the Chanukah menorah, which is many centuries older. The earliest mention of the ritual is by Rashi’s granddaughter, Hannah, who describes her mother lighting candles and reciting the blessing.
(Wikipedia: Shabbat candles, see also here, here or here)
Unfortunately there is no clear source given for where to find the description.
There is also a blog post by The Rebbetzin’s Husband that refutes the attribution to Rashi’s granddaughters:
Example 1: The candle-lighting controversy
Ms. Anton writes in her Afterword:
At this time there was a great controversy over whether a woman should say a blessing over the Sabbath lights, which was settled only after Rashi’s death when one of his granddaughters wrote responsa explaining how the ritual was performed in her mother’s home.
The Responsum in question was written by Rabbeinu Tam, Rashi’s grandson (Sefer haYashar Teshuvah 45), and it simply says to recite the blessing:
I have also heard that they have uprooted the blessing on the Shabbat lamp and desecrated the sacred and the love of the mitzvah. Many obligations require blessings. This is not like mayim acharonim…
There is no mention of any controversy, or even debate.
Example 3: Rashi’s daughter writing a responsum on how candle-lighting was done in her home
The responsum is noted above in Example 1. It was written by Rabbeinu Tam rather than a granddaughter, and it included no reminiscences about how lighting was done at home.
So where does it really come from? I don’t know.