Most microbial communities consist of a genetically diverse assembly of different organisms, and the level of genetic diversity plays an important part in community properties and functions. However, biological diversity also arises at a lower level of biological organization, between genetically identical cells that reside in the same microenvironment. In this Review, I outline the molecular mechanisms responsible for phenotypic heterogeneity and discuss how phenotypic heterogeneity allows genotypes to persist in fluctuating environments. I also describe how it promotes interactions between phenotypic subpopulations in clonal groups, providing microbial groups with new functionality.