By the time that an animal had reached, after numberless generations, the deepest recesses, disuse will on this view have more or less perfectly obliterated its eyes, and natural selection will often have affected other changes, such as an increase in the length of antennae or palpi, as compensation for blindness.
The above quote comes from On the Origin of Species. It is just one of the numerous instances where Charles Darwin, on the basis of his theory, makes a wonderful prediction that comes true so many years after the fact. In this case, his prediction has been shown to be true over and over; species which have gone millions of years in the dark lose their eyesight again and again. We see this especially in many species of cave fish, but it isn’t limited to the oceans:
With a leg span of only six centimetres and a body size of around twelve millimetres, the spider Sinopoda scurion is certainly not one of the largest representatives of the huntsman spiders, which include more than 1100 species. However, it is the first of its kind in the world without any eyes.
“I found the spider in a cave in Laos, around 100 kilometres away from the famous Xe Bang Fai cave,” reports Peter Jäger, head of the arachnology section at the Senckenberg Research Institute in Frankfurt. “We already knew of spiders of this genus from other caves, but they always had eyes and complete pigmentation. Sinopoda scurion is the first huntsman spider without eyes.”
One prediction the theory of evolution allows us to make today that Darwin couldn’t make in his lifetime is that the genes for vision in these now-blind species should exist but be broken. If they do not exist, then either there is some really funky timeline and divergence activity (that is, these are old lineages that evolved before their sighted brethren) and we should see a lot of other genetic differences or evolution just isn’t true. Neither one of those options is very likely, of course. What we observe instead is that, indeed, the genes for vision are a broken, jumbled mess. That isn’t the case yet for the above spider because, as far as I know, no such studies have been carried out, but it is the case wherever else these sort of species have had their genes analyzed.
One point I think that needs to be made sure with Darwin’s quote here is this: Natural selection is unlikely to be the only factor in the disappearance of eyes among these species*. In fact, it could have little to nothing to do with the process at all. Vision in the dark is a useless thing, so natural selection may obliterate it for the sake of saving energy or preventing potential injury to a sensitive body part, but I believe it is much more likely that it simply did nothing. It neither selected for nor against vision. As a result of the lack of positive selection, mutation and genetic drift took over and vision in these species simply faded away.
*I really have two points here. First is the one I just made in the above paragraph. Second is the fact that Darwin was referencing natural selection in regard to it creating some compensation for blindness, not in regard to it directionally causing the blindness.