One of the challenges of designing deep-world settings, like underground ecologies, is the lack of sunlight as an energy source. This is more of a challenge in hard-science settings than it is in magical ones, but even in a fantasy world the fewer handwaves necessary the better.
Which is why I think it's neat to give you
bacteria photosynthesizing from lava, right in the vicinity of black smokers in the deep ocean. No sunlight -- just the red glow of hot rocks.
In an air-filled cavern with magma flows, the light would penetrate farther, and you could be getting the same thing on a larger scale: the basis of a plant ecology that could support grazers and then predators -- or farming.