The two substances that are often seen as answers to this riddle are 'Sulphur' and 'Sugar'
I think both make scientific sense, especially considering how both react when exposed to high temperatures (actually most substances weight more when burned, because oxygen is being added to the equation), but my suspicion is there are probably a number of different substances that this riddle might apply to.
Not being a scientist (I never even paid that much attention in chemistry class), I can't really say that I can give you a much more in depth explanation than to say sulphur meets the requirements of this riddle slightly "more exactly" than sugar.
Good luck!