The rise of dioxygen in Earth’s atmosphere enabled various environmental transitions and biological innovations. Early stem group cyanobacteria may have been the progenitors of oxygenic phototrophs; however, those lineages would eventually go extinct. Adaptation to the changing environment, such as UV radiation, through the evolution of sunscreen biosynthesis in microbes would have enabled early phototrophs to adapt to specific environmental niches. The accumulation of oxygen ∼2.4 Ga enabled the formation of the ozone layer protecting against UVB and UVC radiation, but not UVA. Thus, there would have been selective pressure to evolve novel biosynthetic pathways to produce photoprotective sunscreens, such as scytonemin, in various lineages of crown group cyanobacteria.