How do I make an object shine rays of sunshine at the player when the player reaches the light?

How do I make an object cast sunlight on a specific area to make it seem like you are about to enter the outside world after being trapped in a building?

Please, I have tried everything and teacher said that he was kind of new to it and didn’t really know what to do at all. Thank you for your time.