It is assur for a Jew to ask a non-Jew to do a Milacha for him on Shabbos. These halachos of Amira L’Akum are complex and not the topic of the tshuva. In any event if it is done B’Issur then it is assur to have an benefit from the Milacha.
What happens if a non-Jew turns on a light for you on Shabbos, may you use the light to benefit from the room in a way that you could not have benefited in the dark?
Rav Shlomo Zalman Auerbach in Minchas Shlomo says that at night when it is dark outside and no light shines in, you may not benefit from the light in the room. However in the morning once the day light makes the room usable even without the light, then you may use the room.
Rav Moshe Feinstein (Igros Moshe OC 2:71) says that you may find things in the room and use them even if you could have not done so without the light. He says that only the light itself is assur, but the item that you are looking for and want to use is not assur, so you may do so since the light is only a Grama, and indirect cause, allowing you to use the item you seek. Nevertheless Rav Moshe says a Ba’al Nefesh should be Machmir.
It is brought down in the name of Rav Elyashiv that when it comes to a non-Jew turning off the lights so that a person can sleep there, it is permissible to sleep there. The non-Jew only was “Mavriach Ari”, which essentially means that he removed an obstacle and did not do anything positive that you are benefiting from.