Many insects contain diverse gut microbial communities. While several studies have focused on a single or small group of species, comparative studies of phylogenetically diverse hosts can illuminate general patterns of host–microbiota associations. In this study, we tested the hypotheses that (i) host diet and (ii) host taxonomy structure intestinal bacterial community composition among insects. We used published 16S rRNA gene sequence data for 58 insect species in addition to four beetle species sampled from the Sevilleta National Wildlife Refuge to test these hypotheses. Overall, gut bacterial species richness in these insects was low. Decaying wood xylophagous insects harboured the richest bacterial gut flora (102.8 species level operational taxonomic units (OTUs)/sample ± 71.7, 11.8 ± 5.9 phylogenetic diversity (PD)/sample), while bees and wasps harboured the least rich bacterial communities (11.0 species level OTUs/sample ± 5.4, 2.6 ± 0.8 PD/sample). We found evidence to support our hypotheses that host diet and taxonomy structure insect gut bacterial communities (P < 0.001 for both). However, while host taxonomy was important in hymenopteran and termite gut community structure, diet was an important community structuring factor particularly for insect hosts that ingest lignocellulose-derived substances. Our analysis provides a baseline comparison of insect gut bacterial communities from which to test further hypotheses concerning proximate and ultimate causes of these associations.