The smell of fresh rain (petrichor) comes from
The chemicals released by bacteria
Petrichor is the term used to describe the earthy scent produced during a rainfall on dry soil. The chemicals released by bacteria in the soil after a spell of fresh rain create the distinctive petrichor scent.