The smog which is formed in presence of sunlight is called photochemical smog. This occurs in the months of summer when $NO _{2}$ and hydrocarbons are present in large amounts in atmosphere.
$SO _{2}$ is not responsible for photochemical smog because concentration of $O _{3}$. PAN, aldehyde and ketones builds up in the atmosphere.