Well, flour is pretty explosive...
In that case, it would be small boxes or mini-barrels or something filled with loose flour, and the outside coated in something flammable. To use, they would be lit on fire, and tossed or rolled into place. The explosion would happen once the box broke open, and the flames ignite the flour, and the finely-ground, highly flammable contents caught fire. This might explode the remains of the box (which might end up as proto-shrapnel), and make a fiery little boom.
Alternatively, an unlit box (or barrel, whatever) could be lobbed near or at a flame source, like near a candle or in hearth. This would break on impact, and when the puff of flour-dust reached the flame, it would ignite explosively in a dust explosion - again a lot of boom and pyrotechnics, but probably little in the way of structural damage. This wouldn't require lighting beforehand, might take lighter and untarred boxes (since it wouldn't have to withstand burning) and if carefully used might not clue pursuers in that an external flame is needed.
(edit: I had the idea that a packed box might explode if it burned hot and strongly enough to burn through the box, and that explosion would be much greater and cause more damage since the flour was under pressure - the difference between dust explosions used for special effects and those blowing up buildings. This might not be the case, as Mark points out... or simply tarring and igniting the box might not be enough to burn through the box and get hot enough to set it off. My apologies).
Little sacks of flour would not work well as they aren't packed or pressurized for the first scenario, and probably wouldn't puff dust freely enough for the second. Something of wood, maybe waxed or oiled to help promote burning, and coated in something robustly burnable, like tar. A really savvy customer might include some metal shards or other junk, since it's the shrapnel more than the fire that will cause injuries from little bombs.
The hard part is going to be ignition... there aren't any ways I know of in medieval times to set off fire at a distance. The 'bombs' would have to be ignited along the principles of fire arrows, already lit and burning sturdily enough to survive being thrown.
This might have been discovered by someone experimenting after seeing flour explosions in action (like a bakery fire... I think it was known at the time that flour and fire went boom), or trying for a bigger boom from flaming arrows (and using sawdust or the like as extra fuel). The pieces were in place and readily available, it would only take someone putting the pieces together to make something workable.