What causes that fantastic after-the-rain smell?

rain

Also called petrichor, it's made up of a combination of plant oils, bacterial chemicals, and ozone.

The Compound Interest blog (which is about chemistry, not economics) has a really nice graphic and post that breaks down the different parts of petrichor and explains where they come from. It's worth checking out just for this fact, alone:

Different compounds are involved to varying degrees in the smell of rain, depending on whether we're talking about the post-rain or the pre-rain smell.

Image: Some Rights Reserved by Suika