Bacteria predominantly exist as members of surfaced-attached communities known as biofilms. Many bacterial species initiate biofilms and adhere to each other using cell surface adhesins. This is the case for numerous ecologically diverse α-proteobacteria, which use polar exopolysaccharide adhesins for cell-cell adhesion and surface attachment. Here, we show that Rhodopseudomonas palustris, a metabolically versatile member of the α-proteobacterial order Rhizobiales, encodes a functional unipolar polysaccharide (UPP) biosynthesis gene cluster. Deletion of genes predicted to be critical for UPP biosynthesis and export abolished UPP production. We also found that R. palustris uses UPP to mediate biofilm formation across diverse photoheterotrophic growth conditions, wherein light and organic substrates are used to support growth. However, UPP was less important for biofilm formation during photoautotrophy, where light and CO2 support growth, and during aerobic respiration with organic compounds. Expanding our analysis beyond R. palustris, we examined the phylogenetic distribution and genomic organization of UPP gene clusters among Rhizobiales species that inhabit diverse niches. Our analysis suggests that UPP is a conserved ancestral trait of the Rhizobiales but that it has been independently lost multiple times during the evolution of this clade, twice coinciding with adaptation to intracellular lifestyles within animal hosts.