If a photon doesn't experience time, how can it have a frequency? It is said that photons, moving at c, do not experience time.
But then, if a photon doesn't experience time, how can it have a frequency?
 A: We experience its frequency. It is projection to ascribe this experience to the photon itself.
For example, a corkscrew does not have a frequency. Yet when you look in a fixed direction to it passing by you experience a frequency. 
A: 
It is said that photons, moving at c, do not experience time. 

This is quite an misleading sentence. It blindly translates the limiting case of the time contraction in the (hypothetical) case of a frame moving at the speed of light. However, such a frame does not and cannot exist. While particles moving at the speed of light do.
In such a case, they move at speed $c$ in every inertial frame. In all these frames it is possible to speak about their frequency.
Actually, taking into account QM, the frequency of a monochromatic photon would be just a different name for its energy (through the relation $E=\hbar \omega$). For a real frequency, directly measurable through a measurement of time, one has to go to some coherent state of many photons i.e. to a real electromagnetic wave.
A: According to the second postulate of special relativity, photons are observed as moving at c, that means that the light ray propagating at c is mere observation.
The spacetime interval between the place of emission A and the place of absorption B of photons in vacuum is zero, that means that A and B are adjacent. This is sometimes interpreted as that photons do not experience time, but it might be more correct to say that there is nothing between A and B, the transmission of the momentum is happening directly from the mass particle A to the mass particle B, without need for any photon, and accordingly, the momentum and the frequency are transmitted directly from the mass particle A to the mass particle B, without need for a photon.
However, spacetime intervals cannot be observed by observers. That means, if a spacetime interval of a light ray moving from Sun to Earth is zero, observers will observe a space interval of 8 light minutes and a time interval of 8 minutes, this interval is filled by a light ray as a sort of "placeholder", and all observers will agree on the velocity c of the light ray. 
A: You need to be careful to which frames of reference your two statements
"this photon has frequency $f$" and "a photon doesn't experience time"
apply.
When you say
"this photon has frequency $f = 5 \cdot 10^{14} \text{Hz}$",
then you actually mean 
"in my frame of reference (where my town is at rest)
this photon has frequency $f = 5 \cdot 10^{14} \text{Hz}$."
Now transform, for example, to a frame of reference moving with speed $v = 0.999999\cdot c$
relative to your town.
Then you have $\gamma = \frac{1}{\sqrt{1-v^2/c^2}} = 700$.
In this frame the photon has the much lower frequency
$f' = \frac{f}{\gamma} = 7 \cdot 10^{11} \text{Hz}$.
In the limiting case of a frame moving with speed $v = c$ relative to your town
you have $\gamma = \infty$.
(As pointed out in @GiorgioP's answer, this frame cannot exist.
But let me be sloppy now.)
In this frame the photon has the frequeny $f'  = \frac{f}{\gamma} = 0$. 
So, only in this frame you can say, "the photon doesn't experience time".
