Asteroid and comet impacts are known to have caused profound disruption to multicellular life, yet their influence on habitats for microorganisms, which comprise the majority of Earth's biomass, is less well understood. Of particular interest are geological changes in the target lithology at and near the point of impact that can persist for billions of years. Deep subsurface and surface-dwelling microorganisms are shown to gain advantages from impact-induced fracturing of rocks. Deleterious changes are associated with impact-induced closure of pore spaces in rocks. Superimposed on these long-term geological changes are post-impact alterations such as changes in the hydrological system in and around a crater. The close coupling between geological changes and the conditions for microorganisms yields a synthesis of the fields of microbiology and impact cratering. We use these data to discuss how craters can be used in the search for life beyond Earth.