Light consists of photons which sometimes behave as particles and sometimes as waves. This is known as the wave - particle duality and is true for all particles (even baseballs).
l = c / u ; E = h * u ;
where l = wavelength of light, c = speed of light, u = the frequency of light, E = the energy of the light, and h = Planck's constant. There is a correlation between u (and thus E) and the "color" we perceive.
A light source has a particular energy spectrum, i.e., the energy output is a function of the wavelength, rather than being constant. Below is a plot of output energy versus wavelength for a perfect "white" light.
Real light does not have equal energy at all wavelengths. Below is a plot of output energy versus wavelength for a particular real "white" light.
The intensity of light is proportional to the number of photons of each wavelength. We could associate a spectrum for each light ray, i.e., look at the spectral composition. But this would make it difficult to model refraction since change in direction is a function of wavelength, so it is easier to associate each light ray with a particular wavelength.
An infinite number of color spectra can give rise to the same perceived "color". These are called metemers, i.e., they give perceptually equivalent color but are spectrally different. This happens because our eyes do not have receptors for all wavelengths but only certain ones. The eye contains 64% red cones, 32% green cones, and 4% blue cones.
Here is more information on color.
Main illumination page.
HyperGraph home page.