Many bacterial species are highly social, adaptively shaping their local environment through the production of secreted molecules. This can, in turn, alter interaction strengths among species and modify community composition. However, the relative importance of such behaviours in determining the structure of complex communities is unknown. Here we show that single-locus changes affecting biofilm formation phenotypes in Bacillus subtilis modify community structure to the same extent as loss of an apex predator and even to a greater extent than loss of B. subtilis itself. These results, from experimentally manipulated multitrophic microcosm assemblages, demonstrate that bacterial social traits are key modulators of the structure of their communities. Moreover, they show that intraspecific genetic variability can be as important as strong trophic interactions in determining community dynamics. Microevolution may therefore be as important as species extinctions in shaping the response of microbial communities to environmental change.