Microbes are creatures of their environments. Pressure, temperature, irradiance, fluid flow, the chemistry of solutes and surfaces: all of these, and the scales over which they vary, can factor into the best way to structure a membrane, harvest energy, build biomass, and safely sample genetic variation. In turn, the strategies microbes adopt feed back into local ecosystems and global biogeochemical cycles. I study the interplay between environmental variables and the evolution and spread of microbial and viral functional innovations—from gated microcompartments in cyanobacteria to pigment biosynthesis pathways in phage to a molecular engine of genetic diversification in archaea—which have the potential to shape and reshape the Earth system. My lab uses fieldwork and bioinformatics to describe microbial communities and processes in situ; experimentation, with ecological, microbiological, and biochemical methods, to identify and characterize the molecular innovations that mark these communities; and ecoinformatics to understand the impact of these communities on the Earth system.