We used the 16S rRNA gene pyrosequencing approach to investigate the microbial diversity and community composition in several Costa Rican hot springs alongside the latitudinal axis of the country, with a range of temperatures (37–63°C), pH (6–7.5) and other geochemical conditions. A principal component analyses of the physicochemical parameters showed the samples were separated into three geochemically distinct habitats associated with the location (North, Central, and South). Cyanobacteria and Chloroflexi comprised 93% of the classified community, the former being the most abundant phylum in all samples except for Rocas Calientes 1, (63°C, pH 6), where Chloroflexi and Deinococcus-Thermus represented 84% of the OTUs. Chloroflexi were more abundant as temperature increased. Proteobacteria, Bacteriodetes and Deinococcus-Thermus comprised 5% of the OTUs represented. Other Phyla were present in very small percentages (<1%). A LINKTREE analysis showed that the community structure of the mats was shaped primarily by pH, separating samples with pH > 6.6 from samples with pH < 6.4. Thus, both pH and temperature were relevant for community composition even within the moderate ranges of variables studied. These results provide a basis for an understanding of the physicochemical influences in moderately thermophilic microbial mats.