Specialized relationships with bacteria often allow animals to exploit a new diet by providing a novel set of metabolic capabilities. Bees are a monophyletic group of Hymenoptera that transitioned to a completely herbivorous diet from the carnivorous diet of their wasp ancestors. Recent culture-independent studies suggest that a set of distinctive bacterial species inhabits the gut of the honey bee, Apis mellifera. Here we survey the gut microbiotae of diverse bee and wasp species to test whether acquisition of these bacteria was associated with the transition to herbivory in bees generally. We found that most bee species lack phylotypes that are the same or similar to those typical of A. mellifera, rejecting the hypothesis that this dietary transition was symbiont-dependent. The most common bacteria in solitary bee species are a widespread phylotype of Burkholderia and the pervasive insect associate, Wolbachia. In contrast, several social representatives of corbiculate bees do possess distinctive bacterial phylotypes. Samples of A. mellifera harboured the same microbiota as in previous surveys, and closely related bacterial phylotypes were identified in two Asian honey bees (Apis andreniformis and Apis dorsata) and several bumble bee (Bombus) species. Potentially, the sociality of Apis and Bombus species facilitates symbiont transmission and thus is key to the maintenance of a more consistent gut microbiota. Phylogenetic analyses provide a more refined taxonomic placement of the A. mellifera symbionts.