Color temperature has a specific physical meaning. If we can measure the spectrum of a radiating object, the color temperature is the temperature of a black body radiating most of its light at the same wavelength of the object.

When you plot a black body spectrum on a brightness versus frequency plot, it looks like a bell curve, steeper on the high frequency side than on the low. When you change the temperature of a black body, the shape of the spectrum doesn't change, but the frequency and height of the bell curve do. Thus if you measure the frequency of the peak, you can estimate the temperature of the object. This is described by Wien's Displacement Law,

νpeak = 5.88 × 1010 Hz × T (kelvin)

or

λpeak = 0.29 cm / T (kelvin)

If the object doesn't have a black body spectrum, or you can't precisely measure the spectrum over a wide range of frequencies, you simply estimate the color temperature based on the brightest frequency of light. A (relatively) cool object will have a black body peak in the red end of the visible spectrum, while a very hot one will have a peak in the blue end. The Sun is very near the middle of the visible spectrum, with a peak in the yellow. (Remember that blue light corresponds to very high temperatures, rather than the low temperatures we intuitively associate with water and ice.)

In photography, color temperature describes the lighting conditions under which a photograph was taken. According to the source on the net I found, the photographic color temperature scale roughly follows the physical one. However, the photographic scale is based upon our perception of the light's hue, rather than a physical temperature. The photographic scale ranges from very red light (T = 1000 kelvins) of candles, to warm yellow light (T = 5500 kelvins) of bright sunlight, to blue-white light (T = 10,000 kelvins) of heavy overcast, to very deep blue light (T = 20,000 kelvins) found at high elevation. This doesn't quite follow a physical black body since sunny days are much brighter than heavily overcast ones. But the progression of peak frequencies is the same, and the important point is the perceived hue of the illumination, rather than its intensity.

---
brightness temperature -- color temperature -- effective temperature
---

Sources:
Radiative Processes In Astrophysics, G. Rybicki and A. Lightman, Wiley Interscience
http://cybaea.com/photo/color-correction.html
Class lecture notes