Photo courtesy of CASI (Central Atlantic Storm Investigators)
Rain and lightning both alter the air's contents and make it generally more pleasant to breath. Rain dissolves many of the noxious constituents of air pollution, including oxides of sulfur and nitrogen, and washes them out of the sky. These dissolved chemicals contribute to ground water pollution, but at least you don't have to breath them any longer. Rain also removes most of the dust, soot, and ash particles that are normally suspended in the air by the forces of air resistance. Unfortunately, this material may take to the air again on a windy dry day.
Lightning also changes the air. It electrically charges some of the molecules and particles in the air so that they bind with surfaces and remove themselves from the air. Lightning also creates energetic molecules that normally don't exist in clean air. The most significant of these is ozone, a form of oxygen molecule with three rather than the usual two oxygen atoms. Ozone is a highly reactive molecule that oxidizes and bleaches many other molecules. Its chemical aggressiveness makes it hazardous to breath in large quantities and it's considered a pollutant in surface air. But ozone does attack and destroy some odor molecules and in low concentrations it has a pleasant, tingly smell that we associate with freshness and cleanliness.
Answered by Lou A. Bloomfield of the University of Virginia.