A chemical reaction between solar ultraviolet radiation and an atmosphere polluted with hydrocarbons and oxides of nitrogen causes photochemical smog. ... Smog can happen both during the day and at night, but photochemical smog only happens in the presence of sunlight.