A question that I'm an expert in!
I study circadian rhythms (the process that is responsible for getting us to sleep in the night). Specifically, how circadian rhythms influence how easily we catch diseases, but that part is less relevant to the question.
So since Earth rotates and has day/night cycles, life on Earth evolved to try to predict when the day and night comes. That's what circadian rhythms do. This is really important, since day and night aren't just associated with lightness/darkness. Day and night are associated with a ton of different environmental differences. For instance, it's colder at night, so animals need a way of keeping warm at night. There's more UV light at day, so animals need a way of resisting DNA damage in the day. There's some evidence that the bacteria in the air are different at day vs. at night, so animals will need to have different levels of immune system alertness.
We as humans live in artificial houses with artificial lighting, so we can lose track of why this is really important. But if you've ever went camping or tried to stay out at night you'll probably understand why it's really important for animals to be able to predict the time.
Circadian rhythms end up getting reinforced on a community level, since if it's easier to see in the day, an animal is more likely to forage in the day. Then predators will notice that prey is more plentiful in the day, so it will also be more likely for predators to hunt in the day as well.
Anyways, the end result of all of this is that animals have a huge evolutionary pressure to pick either the day or night to be their active period, which is the time where they look for food and in general just be awake. And whatever they don't pick, that's their rest period, the time where they sleep and recover.
But how do animals know that their circadian rhythms are predicting the correct time? Imagine a mouse in its burrow - it wouldn't be able to tell what time it is just by looking at the sky. And even just stepping out for a second to check would be very dangerous if it ended up being the wrong time. Animals need a way of reading what time it is when their out and about and then correcting their circadian rhythms if the rhythm is inaccurate. There's a lot of different measurements that animals use to read the time, but the key here is that the measurements that they pick must change significantly between day and night. In other words, it must be a very obvious signal, like "oh, I see this signal, so there is no doubt that the time is day."
Vast majority of the time, the most obvious signal ends up behind light. And it makes sense - if you see bright light, that is the clearest indication that it is day outside. So for many animals, light is the primary measure that animals use to read the time.
So to wrap back around to your question, it's not necessarily that light ruins sleep because evolution just decided to go "nae nae," it's because predicting time is incredibly important for keeping animals and humans alive, and up until very recently, light has simply been the easiest and best proxy for the time
And to answer your bonus question, yes, other animals have their sleep messed up by light too