The tendency for flour to explode lies in two of its characteristics - the physical one of being able to form dust clouds, the chemical one of being a carbohydrate. If you have ever set a lit match to some sugar crystals, in a healthy pyromaniac sort of way, you might have realised that it tends to burn very easily. Being made up of predominantly starch, flour classes as a carbohydrate.

Danger lies in flour when it is air-borne as dust. Its high flammable make-up causes the tiny grains to catch fire with even the smallest spark. This will cause the air-borne particle to burn and set fire to the closest particle, and so on, so that an explosive fire wave moves through the flour-dusted air.

This phenomenon occurs in flour mostly because this tends to commonly form clouds - however it may also occur when one is involved with sugar dust, fine pudding mix and other cloud-forming carbohydrates.