Fertilizer bombs typically use ammonium nitrate, NH4NO3. Bombers use it because the stuff is so ubiquitous and so plentiful.
Wiki draws a pretty picture of ammonium nitrate, which partially reveals its explosive potential:
We never hear about spontaneous explosions of ammonium nitrate. Why is that? An old word from the Greek called stoichiometry answers why. Try and balance the chemical equation of NH4NO3 making N2 and H2O:
NH4NO3 => N2 + H2O
Look easy? I gave up. The reason is that the hydrogen to oxygen ratio is inherently 4 to 3 on one side and 2 to 1 on the other. No amount of tweaking the coefficients will balance that reaction. The stoichiometry just doesn't work.
This brings up just how fertilizer bombs do work, because they do make air and water from ammonium nitrate. There is always a little admixture of carbon (typically fuel oil) but charcoal would work too. The carbon combines with the "excess" oxygen present in NH4NO3, making CO2. This trick even has a name: cf. detonation vs. deflagration
Here's a question for any munitions experts out there: were ANFO's involved in Boston? I've heard that the differing sounds of detonation versus deflagration are diagnostic.
A second question is technical: is it possible (in theory) to isotopically label the nitrogen in manufactured ammonium nitrate and thus, after isotopic analysis of air samples at the bombing site prior to mixing, identify the source?
[Added] Well this breaking news should cause a spike in ammo and food prices. The report says that water sprayed on NH4NO3 made it explode. That may actually have been heat from the fire or could have resulted from of what's called heat of hydration when a dry salt suddenly mixes with water. Some salts suddenly mixed with water actually make the water colder.
Ammonium nitrate (AN) is not known to chemically react with water in an explosive way. However, if heated it reacts explosively:
2NH4NO3 => 2N2 + O2 + 4H2O
Now that reaction really produces a sky-full: nitrogen, oxygen, & cloud.