If a non-Jew performed Melacha specifically for a Jew, all Jews are subsequently prohibited from benefiting from that Melacha on Shabbat. However, the Shulhan Aruch in Siman 276 rules that if the non-Jew did the Melacha for his own use, the Jew may benefit from it on Shabbat. For example, if the Jew is sitting in a dark room, unable to read, and the non-Jew enters the room looking for some item of his and turns on the lights to aid his search, the Jew may read with that light.
What would be the Halacha if, in such a case, the non-Jew wants to turn off the lights after locating his item? Is the Jew allowed to ask him to refrain from extinguishing the lights, in order that he continue to benefit. The Poskim rule that it is permitted to do so, since the Jew is not instructing the non-Jew to actively perform a Melacha . All he is doing is asking him to refrain passively, "Shev V’al Ta’aseh."
This case illustrates a general principle by which any time the lights were turned on in permitted circumstances, all other Jews may continue to benefit afterwards.
One application of this principle would be if a non-Jew turned on the lights for a "Choleh She’en Bo Sakanah" (A person sick with a non-life-threatening-illness) or a "Katan" (child). In both instances, not only may the patient or child benefit from the light, but so may anyone else. For that matter, even if the light was turned on by Jews, such as in a case where Hatzolah was called to tend to a life-threatening emergency in a dark home on Friday night, other people may continue to benefit from the light.
It is important to stress that these Halachot have many variations and details. Each case is unique, and the layman cannot extrapolate from case to another.
If a non-Jew turned on the light for his own benefit, a Jew may benefit from it.
In such a case, the Jew may ask the non-Jew to refrain from turning the lights back off.
Any case in which it was permitted to turn on the lights, anyone may benefit from the light.