It's caused by the elements that are being burned off. Examples: If you burn platinum, the flame will be white (don't stare into this flame, you will burn your retinas right off and go blind), if you burn copper, it's a green flame, and I believe iodine causes a flame to burn brown.