This is a node setup utilising a colour ramp node to perform a conversion between black body temperature (in Kelvin) and RGB colour space based on conversions performed by Mitchell.N.Charity.
Since Blender 2.69, cycles has included a black body node - however after getting some strange results, I did some experimentation with it and discovered that the RGB values it outputs do not appear to be normalised in the range 0-1. In some cases the RGB components can exceed 1 which can give some strange/unintended effects. The black body node in blender is also limited to a maximum temperature value of 12,000K - which can be too low if you want to accurately recreate the colour of some natural phenomena (e.g. blue sky daylight or blue supergiant stars).
The colour ramp in this node group has all RGB values normalised within the range 0-1 and also expands the range of available temperatures to 40,000K