I read that roughly 20% of all species of mammals are bats. Is there a good explanation for why bats have diversified so much compared to other mammals? Is it because bats' ability to fly allows them to fill niches that are completely out of reach (pun intended) of other mammals? If so, how is this reconciled with the coexistence of bat populations and bird populations?
Indeed, good question. There's tiny bats, large bats, and so many different species of them! A clue can be found in the observation that each bat species is almost always restricted to a small geographical region. With this in mind, it has been shown that an animal lineage's ability to diversify quickly in new environments depends largely on its diet. Bats have an incredible variety of dietary sources. Plant nectar, insects (there's so many different kinds of insects...), blood-feeding, and more! So, as you can imagine, bat species are restricted because they have specialized diets and because they are very good at taking up new diets over evolutionary time. Unfortunately for them, it restricts them to a geographical location much of the time. Geographical restriction is always a good starting point for speciation events, and there have been many in the bat clade. But why bats, specifically, you might ask? Well - it is argued (below) that it is due to the characteristics of their skulls, rather than their wings.
Dumont, E. R., Dávalos, L. M., Goldberg, A., Santana, S. E., Rex, K., & Voigt, C. C. (2012). Morphological innovation, diversification and invasion of a new adaptive zone. Proc. R. Soc. B, 279(1734), 1797-1805.