Understanding the forces that shape the distribution of biodiversity across spatial scales is central in ecology and critical to effective conservation. To assess effects of possible richness drivers, we sampled ant communities on four elevational transects across two mountain ranges in Colorado, USA, with seven or eight sites on each transect and twenty repeatedly sampled pitfall trap pairs at each site each for a total of 90 d. With a multi‐scale hierarchical Bayesian community occupancy model, we simultaneously evaluated the effects of temperature, productivity, area, habitat diversity, vegetation structure, and temperature variability on ant richness at two spatial scales, quantifying detection error and genus‐level phylogenetic effects. We fit the model with data from one mountain range and tested predictive ability with data from the other mountain range. In total, we detected 105 ant species, and richness peaked at intermediate elevations on each transect. Species‐specific thermal preferences drove richness at each elevation with marginal effects of site‐scale productivity. Trap‐scale richness was primarily influenced by elevation‐scale variables along with a negative impact of canopy cover. Soil diversity had a marginal negative effect while daily temperature variation had a marginal positive effect. We detected no impact of area, land cover diversity, trap‐scale productivity, or tree density. While phylogenetic relationships among genera had little influence, congeners tended to respond similarly. The hierarchical model, trained on data from the first mountain range, predicted the trends on the second mountain range better than multiple regression, reducing root mean squared error up to 65%. Compared to a more standard approach, this modeling framework better predicts patterns on a novel mountain range and provides a nuanced, detailed evaluation of ant communities at two spatial scales.