Light frequency and time relation I am reading Stephen Hawking "A Brief History of Time" recently, and I cannot understand perfectly this little fragment:

(...) Another prediction of general relativity is that time should
  appear to slower near a massive body like the earth. This is because
  there is a relation between the energy of light and its frequency
  (that is, the number of waves of light per second): the greater the
  energy, the higher frequency (...)

How is that light influence time?
He writes also:

As light travels upward in the earth’s gravitational field, it loses
  energy, and so its frequency goes down. (This means that the length of
  time between one wave crest and the next goes up.) To someone high up,
  it would appear that everything down below was making longer to
  happen.

And that I can understand, it just a matter of perspective. But what's most confusing for me is this:

This prediction was tested in 1962, using a pair of very accurate
  clocks mounted at the top and bottom of a water tower. The clock at
  the bottom, which was nearer the earth, was found to run slower, in
  exact agreement with general relativity

How is that related to light? How light affects situation when clock at the bottom was found to run slower? I know basics of general relativity, I am just confused why did he mentioned "relation between the energy of light and the frequency" in that. I'am probably missing something obvious here, that's why I am waiting for someone to help me.
 A: We can think of time as a way to measure intervals that separate two events. In this case, light is introduced to help you visualize how time dilation happens.
Imagine there's a machine composed of two plates separated by one meter, and from the bottom light is emitted. Since the light is a wave, we can measure our time as the interval it takes for two consecutive crests to arrive (i.e. a time unit). In the absence of external influences, we should measure the same time no matter our position with respect to the clock.
Now let's put our clock near an object with an intense gravitational field and you stay near it while I position myself away from it. As Hawking says, as the light is traveling upwards it loses energy (remember energy, frequency, and wavelength are related by $E=h\nu=hc/\lambda$). Since the speed of light $c$ must be conserved, that means that the frequency $\nu$ decreases and thus the wavelength $\lambda$ increases. 
Now if you measure the time between two consecutive crests, you will measure one-unit of time (say, one second).. However, I see the clock from far away and I notice that, due to the gravitational field, the wavelength of the light now has increased. This means it takes longer for two consecutive crests to arrive to the top plate, so I measure a longer time (say 2 seconds). That means that time has been affected by the presence of a gravitational field (this is actually called gravitational redshift).
Now this may seem like a particular case for light, but remember that all matter is essentially made up of elementary particles with their own interactions, and time is measured as the interval between each interaction. So their "time" is also affected by the gravitational field in the same was that light was affected by the gravitational field.
Since atomic clocks are basically clocks that measure time according to specific atomic transitions, they're affected by the gravitational effect I just mentioned before. This is why we observed a small but non-zero difference on the intervals of time measured by the clocks on the ground and the clocks on an airplane.
Hope this helps make it more clear.
A: Basically you have raised questions those I have listed below.
(1) Question in relation between the energy of light and it's frequency.
(2) Question in light loosing energy and so decreasing it's frequency as it escape a gravitational well.
(3) Question the test in 1962 showing time running slower at the bottom of a tower near Earth than the top of the tower where time is running faster.
Accordingly, I would like to answer your questions as mentioned below.
A1. Photon is gauge boson, carrier of electromagnetic force. Therefore, the entire spectrum of electromagnetic waves carried by photons.
Light is a small part within the spectrum of electromagnetic waves, the spectrum includes radio waves, microwaves, infrared, visible light, ultraviolet, X-rays, and gamma rays.
The energy of a photon can be calculated from Max Planck's equation E = hf, where, E denotes energy of a photon in Jules, f denotes frequency of the wave in Hz, and Planck's constant h = 6.625×10^–34 Js. The equation is applicable for the electromagnetic spectrum.
Here is the relationship between frequency of photon and it's energy.
A2. When a photon leaves a gravitational well after its emission, it spends energy to escape the gravitational well, as a result it's energy reduces, and as per the Planck's equation above, photon frequency too reduces due to the reduction of it's energy. The photon will have most of it's energy immediately after it's emission for it's source and so it's frequency too would be most then.
The wavelength of a wave is inversely proportional to the waves frequency, so that when a photon reduces it's energy, it's frequency too reduces but it's wavelength increases, resulting the red shift of the photon in electromagnetic spectrum, due to such enlargement in the photon wavelength. This is known as gravitational red shift.
Light consist of photons, so when photon energy reduces, it's frequency also reduces, as explained above.
A3. The test in 1962, that you have questioned, showing time running slower or faster depending upon the relative gravitational potential differences.
In fact, it is an erroneous proposition in relativity. Because of the relative slower or faster running of the clocks are not due to time dilation, rather for the error in the reading of relative clock times due to relative phase shifts in frequency of the wave of the clock oscillations under relative gravitational influences, and corresponding relative reduction or enlargement in the wavelengths of the wave of said clock oscillations, in a relationship between wavelength and time period of the waves of the clock oscillations. Distortions of wavelengths exactly correspond to time distortions λ∝T.
Experiments made in electronic laboratories on piezoelectric crystal oscillators show that the wave corresponds to time shift due to relativistic effects.
Whereas, the time interval T(deg) for 1° of phase is inversely proportional to the frequency (f). We get a wave corresponding to the time shift.
For example, 1° phase shift on a 5 MHz wave corresponds to a time shift of 555 picoseconds (ps).
We know, 1° phase shift = T/360.
As T=1/f,
1° phase shift = T/360 = (1/f)/360.
For a wave of frequency f = 5 MHz, we get the phase shift (in degree°)
= (1/5000000)/360
= (5.55x10^10)
= 555 ps.
Therefore, for 1° phase shift for a wave having wavelength λ = 59.95m, and frequency f = 5 MHz, the time shift (time delay) Δt = 555 ps (approx).
Time shift of the caesium-133 atomic clock in the GPS satellite in space:
For 1455.50003025° phase shift (or, 4.043055639583333 cycles) of a 9192631770 Hz wave; time shifts (time delays) Δt = 0.0000004398148148148148 ms (approx) or, 38 microseconds time is taken per day.
Therefore, the wavelength dilation of the clock oscillation due to relativistic effects, or gravitational potential difference on the clock mechanism results in corresponding error in the reading of time in the clock, wrongfully presented as time dilation. Time dilation is rather wavelength dilation.
