An early study of flame luminosity was conducted by Michael Faraday and became part of his series of Royal Institution Christmas Lectures, The Chemical History of a Candle.
Producing a deliberately luminous flame requires either a shortage of combustion air (as in a Bunsen burner) or a local excess of fuel (as for a kerosene torch).
By Planck's law, as the temperature decreases, the peak of the black-body radiation curve moves to longer wavelengths, i.e. from the blue to the yellow.
However, the blue light from a gas burner's premixed flame is primarily a product of molecular emission (Swan bands) rather than black-body radiation.
For heating work, the air inlet is opened and the burner produces a much hotter blue flame.