In a key moment in The Two Towers, Legolas claims to be able to count the Riders of Rohan and even spot the height of the leader of the group. That’s because elves are, like, amazing, and awesome, and fabulous, and have way better eyesight than you. Except that according to actual physics, Legolas was totally lying through his teeth about that last one.
For the full explanation, which is actually pretty neat, you should watch the video, but it can essentially be summed up as “Eyes, light, and atmosphere do not work that way.” Refraction makes it almost impossible to have a telescope in your noggin. Due to that, it’s more likely Legolas bluffed and turned out to be right.
That said, there might be a way for it to work. As we all know, light is both a wave and a particle. It might be that Legolas sees light not as waves at all, but entirely as particles, because he’s a magical fairy creature. With the nature of particles and refraction, the elves might have an eye structure that compensates for refraction, or reduces it as much as possible, and allows them to avoid the problem altogether. It’s worth noting here that how light as a particle refracts through surfaces is a matter of some debate which scientists are still arguing over.
Or he just knew ahead of time that the Riders were there and is kind of a scumbag. Really, what’s more likely?