Understanding the origin of life (abiogenesis) on Earth is key to understanding how it might start elsewhere. Recent laboratory studies suggest UV light may have played a critical role in the synthesis of molecules relevant to abiogenesis (prebiotic chemistry), such as RNA. I show that UV light interacts with prebiotic chemistry in ways that may be sensitive to the spectral shape and overall amplitude of irradiation. I use radiative transfer models to constrain the UV environment on early Earth (3.9 Ga). I find that the surface UV is insensitive to much of the considerable uncertainty in the atmospheric state, enabling me to constrain the UV environment for prebiotic chemistry on early Earth. Some authors have suggested Mars as a venue for prebiotic chemistry. Therefore, I explore plausible UV spectral fluences on Mars at 3.9 Ga. I find that the early Martian UV environment is comparable to Earth’s under conventional assumptions about the atmosphere. However, if the atmosphere was dusty or SO2 levels were high, UV fluence would have been strongly suppressed. Intriguingly, despite overall attenuation of UV fluence, SO2 preferentially attenuates destructive FUV radiation over prebiotically-useful NUV radiation, meaning high-SO2 epochs may have been more clement for the origin of life. Better measurements of the spectral dependence of prebiotic photoprocesses are required to constrain this hypothesis. Finally, I calculate the UV fluence on planets orbiting M-dwarfs. I find that UV irradiation on such planets is low compared to Earth. Laboratory studies are required to understand whether prebiotic processes that worked on Earth can function on low-UV M-dwarf planets. My work 1) provides initial conditions for laboratory studies of prebiotic chemistry, 2) constrains the inhabitability of Mars and planets orbiting M-dwarfs, and 3) demonstrates the need for laboratory studies to characterize the impact of variations in irradiating intensity and spectral shape on prebiotic photochemistry. All software associated with these studies, including models and data inputs, are publically available for validation and extension. I acknowledge support from the NSF GRFP and the Simons Foundation.