There are many cave-dwelling creatures besides bats and many of them lose their pigmentation and their eyes. There are also many cave fish throughout the world of many different types, and again, they also typically lose their eyes and pigments.
There are also entire communities of all kinds of animals in the deep sea, typical around hydrothermic vents and whale carcasses that have sunk to the bottom. These creatures live so deep in the ocean that they never see sunlight either.
In school we learn that plants use sunlight to photosynthesize, which is how plants make their own food. The form the base of the food chain. Some animals eat plants and then other animals eat those animals. That is the way is is on most of Earth’s surface, but life is so adaptable that it exists in many places you wouldn’t think that it could.
Bats are vital to the other living tings in many caves. Cave-dwelling bats typically fly out at night and feed on insects. They then fly back into the cave to sleep and digest their food. No animal digests 100% of what they eat, and what they don’t digest comes out the other end. In birds and bats we call it guano. The guano still has some nutrition in it, on which fungi and insects can feed. Occasionally these insects fall into the water, which is what the fish feed on. Food is also washed into the cave after rain storms.
Food in caves tends to be scarcer than outside, so cave fish have to be more efficient with their energy. Eyes and pigments take energy to make and are useless in caves, so to save energy they are lost through evolution. What is amazing is that his happens time and time again to completely unrelated fish on opposite sides of the world.
Photograph of a paratype of Amblyopsis hoosieri in life, YPM ICH 25304, 60.7 mm SL. Photograph by M.L. Niemiller.
By Prosanta Chakrabarty, Jacques A. Prejean, Matthew L. Niemiller (https://zookeys.pensoft.net/articles.php?id=3824) [CC BY 3.0 (https://creativecommons.org/licenses/by/3.0) or CC BY 4.0 (https://creativecommons.org/licenses/by/4.0)], via Wikimedia Commons