Although ecosystems thriving in the absence of photosynthetic processes are no longer considered unique phenomena, we have yet to understand how these ecosystems are energetically sustained via chemosynthesis. Ecosystem energetics were measured in microbial mats from active sulfidic caves (Movile Cave, Romania; Frasassi Caves, Italy; Lower Kane Cave, Wyoming, USA; and Cesspool Cave, Virginia, USA) using radiotracer techniques. We also estimated bacterial diversity using 16S rRNA sequences to relate the productivity measurements to the composition of the microbial communities. All of the microbial communities investigated were dominated by chemolithoautotrophic productivity, with the highest rates from Movile Cave at 281 g C/m2/yr. Heterotrophic productivities were at least one order of magnitude less than autotrophy from all of the caves. We generated 414 new 16S rRNA gene sequences that represented 173 operational taxonomic units (OTUs) with 99% sequence similarity. Although 13% of these OTUs were found in more than one cave, the compositions of each community were significantly different from each other (P≤0.001). Autotrophic productivity was positively correlated with overall species richness and with the number of bacterial OTUs affiliated with the Epsilonproteobacteria, a group known for sulfur cycling and chemolithoautotrophy. Higher rates of autotrophy were also strongly positively correlated to available metabolic energy sources, and specifically to dissolved sulfide concentrations. The relationship of autotrophic productivity and heterotrophic cycling rates to bacterial species richness can significantly impact the diversity of higher trophic levels in chemolithoautotrophically-based cave ecosystems, with the systems possessing the highest productivity supporting abundant and diverse macro-invertebrate communities.