Spectra in the wavelength range of 300–600 nm have been acquired during proton-beam irradiation of samples of solid hydrogen and deuterium at 4.2 K. Emission spectra from the transitions A′ 3Δu→X 3Σ−g of O2, 4S–2D of N i, and 1D–1S of O i have been measured and attributed to an air impurity in the sample. Comparison is made of the vibrational constants derived from the molecular bands, the spectral shifts of all features, and the lifetime of the 2p3 2D multiplet of N i obtained in the solid hydrogens with those obtained by matrix isolation studies using N2 and rare gas hosts.