Why does rain have that smell?
Interesting question. I actually had to look up the definition of petrichor.  After getting a little nostalgic about rainfall, I decided to go ahead and forage around for an answer for you.  I found a nice summary article here for those that are interested, and then a really nice bit of history here with a link to a great video about how rainfall helps to produce aerosols, which can contain the petrichor compounds.

Your question regards the reactions in the soil that give the petrichor smell, so let me get to that:

The main constituents of petrichor are volatile plant oils and geosmin. Oxidation of the fatty acids produced by plants can lead to some of the volatile compounds that constitute petrichor. Geosmin is a metabolite of actinobacteria and is produced through a biological pathway.


https://en.wikipedia.org/wiki/Geosmin - a brief intro to Geosmin
http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3013058/ - A free paper highlighting the biosynthesis of geosmin