

Our electricity was restored on Shabbat. The lights in the house went back on. Are we permitted to benefit from these lights even though they were restored on Shabbat?
One is not permitted to benefit on Shabbat from a Melacha that was done by a non-Jew for the sake of a Jew. This is true even if the Jew did not request the favor. The Mishna Berura (276:2) explains that this is forbidden because we are concerned that in a future situation, one might ask the non-Jew directly. However, if the majority of those who will benefit from the Melacha are non-Jews, then a Jew may benefit as well. In most situations, the majority of people who will benefit from the restoration of power are non-Jews. However, even if a neighborhood is mostly Jewish, it is still permitted to benefit from the lights. The electric company restores power for their own benefit (they are legally required to do so), regardless of whether anyone asks. Since the workers are doing so for their own needs a Jew may benefit from the electricity as well. (See Mishna Berura 276:17.)
If the electricity went off on Shabbat and was subsequently restored a few hours later by non-Jewish workers, what is the status of the reheated food?
Shemirat Shabbat K’Hilchata (32:{174}) and Teshuvot B’Tzel HaHochma (4:137) write that if there is a power outage on Shabbat, it is permissible to enjoy the hot food even if the food cooled down and was then reheated when the power was restored. There is no problem of benefiting from the action of a non-Jew on Shabbat because the non-Jewish workers restore the power for their own benefit, and therefore a Jew may benefit from the electricity as well. There is also no violation of the restriction of Hazara (the prohibition of reheating food on Shabbat), since the Jew is passive, and it is treated as if everything happened on its own. While the Hazon Ish is strict in this case, the consensus of the Poskim is to be lenient.