Lasers, for example, are a source of photons which emit a single wavelength of light. Using the wave equation c = f * u (where c is the speed of light, f is the frequency and u is the wavelength), you can obtain the frequency by dividing the speed of light by its wavelength.
In cases such as the sun, where photons of many, many different energies are emitted, you need to find the peak wavelength to determine the peak frequency of the light. Using Wien's Displacement Law, u = b/T--where u is the peak wavelength, b is Wein's displacement constant and T is the temperature of the source--you can find the peak wavelength by dividing b by the known temperature of the sun's surface. You can then follow the steps for a single-wavelength source to determine the frequency.
You can also determine the frequency of light by its color. This works only for visible light, but each color has an associated wavelength, which can then be converted to a frequency using the single-wavelength source method.