From what I understand, and trying to read different philosophies of dragons, me personally believe that it is some sort of acid function within the belly of the dragon. To me the acids in the belly of the dragon react differently towards what type of dragon hence why Red Throws fire, Blue throws lightning, Green throws just Poison gas. I would go theory here, but then that just make me seem stupid. So I go with, that, depending on the skin of the dragon, the gas and acid within the stomach creates different reactions towards different dragons and poof something happens when they hock a loogie, or in a sense...throw up.