Specifically, the effects of Gunpowder exploding is covered in DMG 267, under Explosives. And Oil is covered in PHB 152, but only for a flask.
Broadly, rules for Improvising Damage is in DMG 249, where it lists various examples and the amount of damage, by increments of d10s.
If you don't like memorizing all those bits, or are still having trouble improvising the damage, you can read: The Angry GM’s Marvelous Mechanical Miscellany for Ad Hoc Adjudication and Improvisational Invention (WARNING! TheAngryGM link, contains swearing and beating people with their copies of the DMG). It gives clear guidelines on how to improvise setting the DC, and how much damage an effect should do. I'll quote some of it here, in case the link goes dead:
First of all, pick a baseline damage: d6 for a low damage effect, d8 for medium damage, and d10 for high damage. If the damage can happen more than once, reduce the size of the die. So, for a continuous effect or a trap that goes off every round, the damage is d4, d6, or d8.
Now decide if the damage is leveled. The idea is the same as the one I discussed above for setting DCs. Tripping and falling into a campfire isn’t leveled. It’s just stupid. Stout, hardy heroes are more likely to shrug off that blunder. So that damage isn’t leveled. But if the fire trap is in Tyracticus’ Fortress, you can damn well bet he’s using magical super hellfire. It’s leveled as hell.
If the damage is leveled, roll half as many dice as the PC has levels, with a minimum of 1. At first level, if you want to, you can reduce the die size. Up to you. I find it doesn’t make much difference and it’s only for one level. If the damage isn’t leveled, roll 2 dice.
I've personally tried this method, and have found that it is not as punishing as I like, so I stepped up the damage die in the baseline damage to d8, d10, and d12.