Is the frequency of photon invariant? I saw a stackexchange answer that says the energy of photons is dependent on the reference frame. I did some digging and found that this is because the frequency of photons is dependent on the reference frame.
I am looking for an intuitive explanation as to why. So far I have considered Doppler effect as the main culprit - wherein the photon's wavelength changes based on how fast you are moving relative to the source of emission. Obviously, this means the frequency of the photon changes accordingly.
However, this explanation feels incomplete.
 A: A light-signal has a lightlike 4-momentum $\tilde \omega$ where $\tilde \omega \cdot \tilde \omega=0$. So, its energy-component is equal to the magnitude of its momentum-component.
For simplicity, consider the $(1+1)$-case so that all motion is along the  x-axis.
The Lorentz boost has eigenvectors along the light-cone (so that a light-signal remains a light-signal) and has eigenvalues are equal to the Doppler factor $k=\sqrt{\frac{1+v}{1-v}}$ and its reciprocal (since the determinant of the boost is equal to the product of its eigenvalues, and the determinant is equal to 1). Check this... set up the eigenvalue problem for the boost.
Thus, in a new frame, energy of the light-signal (and thus the frequency) is multiplied by the doppler factor.

UPDATE: Note that "length contraction" does not directly apply to the Doppler effect. The length-contraction factor and the time-dilation factor are even functions of V-- that is, they depend on speed... but not direction.

*

*Length contraction depends on relative-speed and applies to the spacelike-separation between parallel timelike-worldlines.

*Doppler effect on wavelength depends on the relative-velocity (including approaching vs receding) and applies to the spacelike-separation between parallel lightlike-worldlines.

See: my answer https://physics.stackexchange.com/a/337804/148184 to Deriving Relativistic Doppler Effect through length contraction )

UPDATE2: Hopefully, this diagram will provide some spacetime-geometric intuition.
Regard the diagram below as a spacetime-diagram (with time running upwards).
The effect of an active Lorentz boost transformation takes
the pink diamond with the red diagonal
to the cyan diamond with the blue diagonal.

*

*O gets mapped to itself, A gets mapped to B (another point on a hyperbola [of radius 5]), and L gets mapped to M (along the light cone, a hyperbola of radius 0).

*The velocity $v=(3/5)c$, which corresponds to time-dilation factor $\gamma=\frac{1}{\sqrt{1-(v/c)^2}}=\frac{5}{4}$ and Doppler factor $k=\sqrt{\frac{1+(v/c)}{1-(v/c)}}$=2. These numerical values can be read off the diagram: $(v/c)=\frac{AQ}{OA}=\frac{3}{5}$, $\quad$ $\gamma=\frac{OA}{OQ}=\frac{5}{4}$, and $\quad$ $k=\frac{OM}{OL}=2$. (Note the diamond area is unchanged since the determinant of the boost (which equal the product of the eigenvalues) equals 1. So, the stretch by $k=2$ in one lightlike direction has a shrinking by the same factor along the other lightlike direction).


Now regard this as an energy-momentum diagram (with energy running upwards).

*

*$OA$ is a momentum 4-vector of a particle with invariant mass 5 units.
$OL$ is a momentum 4-vector of a photon with relativistic energy 2.5 units [and relativistic momentum 2.5 units, so its invariant mass is zero units].

*Under an active boost, the corresponding momentum 4-vector of the photon is scaled by the Doppler factor $k$ (that is, $OM=k(OL)$) so that the boosted photon has relativistic energy of $k(2.5)=2(2.5)=5$ units. Since the relativistic energy is proportional to its frequency ($E=\mbox{(const)}\omega$), the frequency of the boosted photon is now $k$ times its frequency in the original frame.


Interpret it this way.

If the forward-directed photon in the rocket frame had relativistic energy 2.5 units, then in the lab frame (where the rocket has velocity $(3/5)c$), that forward-directed photon has relativistic energy $k(2.5)=5$ units.

I hope this gives some quantitative intuition.
(See my other answer to directly connect with "period" and "wavelength".)
A: 
Is the frequency of photon invariant

The photon is an elementary quantum mechanical point particle of the standard model of particle physics.
As it has no space dimension, it is a point in (x,y,z,t), there is no wave to have a length in space. It has a quantum mechanical wave function which has a wavelength but for a single photon the only meaning is that it is connected to the probability to be found in (x,y,z,t).
What depends on the reference frames as far as space waves go, is the classical electromagnetic light wave, as discussed in the other answers, not photons. Photons just change energy in differently moving inertial frames.
Photons carry the energy $h*ν$ where $ν$  is the frequency of the classical beam which is built up by very many photons and $h$ the Planck constant.
In quantum mechanics the wavefunction $Ψ$ models the probability of finding a single  photon at (x,y,z,t), by $Ψ^*Ψ$
See this answer of mine to get an intuition of how photons build up the classical wave of light.
A: Photons move along lightlike geodesics regardless of the observer, so although energy $E=h\nu$ and momentum $\boldsymbol{p} = (h/\lambda)\boldsymbol{\hat{n}}$ depend on the observer, the following quantity is invariant:
$$\frac{E^2}{c^2} - \boldsymbol{p}\cdot \boldsymbol{p} = 0$$
In special relativity theory, Lorentz transformations imply that for two observers O and O' with relative velocity $V$ along X axis (assume O is static withe respect to the light source, and O' is approaching the source), we have the relations:
$$E' = \frac{E-V p_x}{\sqrt{1-V^2/c^2}}, \quad p'_x = \frac{p_x - EV/c^2}{\sqrt{1-V^2/c^2}},\quad p'_y = p_y, \quad p'_z = p_z $$
where $(E/c,p_x,p_y,p_z)$ and $(E'/c,p'_x,p'_y,p'_z)$ are the energy-momentum componentes measured by O and O'. These two expressions in turn imply that:
$$\nu' = \nu \sqrt{\frac{1+V/c}{1-V/c}}, \qquad \lambda' = \lambda \sqrt{\frac{1-V/c}{1+V/c}}$$
The the light velocity for both observers are:
$$c = \lambda\nu, \qquad c' = \lambda'\nu' = \left(\lambda\sqrt{\frac{1-V/c}{1+V/c}}\right)\ \left(\nu \sqrt{\frac{1+V/c}{1-V/c}}\right) = c$$
Thus, since the wavelength contracts as an observer moves toward the wave source (Lorentz distance contraction), there must be a time dilation to compensate for it, otherwise some observer would see the light moving at a speed different from $c$.
A: Lots of answers have provided details, but perhaps more complexity than you were looking for. There are two simple points that answer your question:
(1) Energy is always frame dependent. For example, in a frame where an object is at rest it has no kinetic energy; in a frame where it is moving, it has some, and the amount depends on the relative velocity of the object.
(2) Frequency does change based on the Doppler effect, and light's energy is directly related to its frequency, so your initial guess was correct. There are some technical issues addressed in the other answers, but basically that's it.
A: Time dialation/length contraction is the reason.
This is called the relativistic doppler effect
A: So once you consider "the source of emission", you are hampering your understanding of the problem: the source of emission is irrelevant.
A photon just exists.
It moves at $c$ in all frames, and can have any non-zero frequency (in SR...irl it's bounded above by the Planck frequency, probably).
A: Rather than add to or edit my first set of answers (which focused on the Doppler factor as an eigenvalue that was used to scale the 4-momentum of a light-signal and also emphasized that length-contraction is not directly involved), this answer tries to directly connect the Doppler factor to the properties of period and wavelength.
Consider a source with velocity $v=(3/5)c$. The corresponding Doppler factor is $k=\sqrt\frac{1+(v/c)}{1-(v/c)}=2$.
If the source emitting signals at every 4 of its ticks ($T_{src}=4$),
then the corresponding wavelength in the source frame is gotten from $\lambda_{src}/c=4$). I'm going to drop the $c$'s out of convenience.
The spacetime diagram (with "rotated graph paper" to help visualize the tickmarks along worldlines) shows the periodic source and the light-signals (which can be associated with wavefronts).
This diagram is drawn by Alice who is at rest in this frame.
She meets Bob (the source) at event $O$.

In this frame, if a receiver at rest detects the backward-directed signals,
the source is moving away from the receiver ("the separating case").

*

*Two successive backward-directed signals are detected by Alice at events $O$ and $A_{RB}$.
Alice measures a period between receptions $T_r = k T_{src}=(2)(4)=8$.
(After Bob passes Alice at O and continues to separate, Alice takes 8 hours to watch [in slow motion] a 4-hour show broadcasted by Bob.)
Alice measures a spatial separation $\lambda_r =k \lambda_{src}=(2)(4)=8$ (along a line of events simultaneous with the second reception event $A_{RB}$ according to Alice). As a check, Alice measures the speed of the light-signal to be $\lambda_r/T_r=c$.

*Since the observed-period is longer by the factor $k$, the observed-frequency
is lower $f_{r}=\frac{1}{k}f_{src}$, which corresponds to a "redshift".
Since the energy is proportional to the frequency, the observed-energy is lower.
Similarly, the observed-wavelength is longer by the factor $k$, which also corresponds to a redshift. Since the momentum is inverse-proportional to the wavelength, the observed-momentum is also lower.

*We will argue that, on an energy-momentum diagram, the 4-momentum of the light-signal for a separating source is proportional to the shorter edge of the blue causal diamond in this frame,
which corresponds to a less-energetic light-signal compared to the energy in the source-frame.

In this frame, if a receiver at rest detects the forward-directed signals,
the source is moving toward the receiver ("the approaching case").

*

*Two successive forward-directed signals are detected by Alice at events $A_{RF}$ and $O$.
Alice measures a period between receptions $T_r = \frac{1}{k} T_{src}=\frac{1}{2}(4)=2$.
(Before Bob passes Alice at O and continues to approach, Alice takes 2 hours to watch [in sped-up motion] a 4-hour show broadcasted by Bob.)
Alice measures a spatial separation $\lambda_r = \frac{1}{k} \lambda_{src}=\frac{1}{2}(4)=2$ (along a line of events simultaneous with the second reception event $O$ according to Alice). As a check, Alice measures the speed of the light-signal to be $\lambda_r/T_r=c$.

*Since the observed-period is shorter by the factor $k$, the observed-frequency
is higher $f_{r}=kf_{src}$, which corresponds to a "blueshift".
Since the energy is proportional to the frequency, the observed-energy is higher.
Similarly, the observed-wavelength is shorter by the factor $k$, which also corresponds to a blueshift. Since the momentum is inverse-proportional to the wavelength, the observed-momentum is also higher.

*We will argue, on an energy-momentum diagram, that the 4-momentum of the light-signal for an approaching source is proportional to the longer edge of the blue causal diamond in this frame,
which corresponds to a more-energetic light-signal compared to the energy in the source-frame.


Next, consider the following diagram.


*

*If the source were drawn in the source-frame, it would correspond to the red diamond. (When $v=0$, then $k=1$.)

*But since the source is drawn in Alice's frame, where Alice measures the velocity of the source to be $v_{Bob}=(3/5)c$, it corresponds to the blue diamond [here and in the previous diagram].

*The effect of the Lorentz boost transformation preserves the edges of the diamond (lightlike directions are eigenectors) and preserves the area of the diamond (since the determinant of the boost [product of eigenvalues] equals 1). The eigenvalues are $k=\sqrt\frac{1+(v/c)}{1-(v/c)}$ and $1/k$, with $k=2$ for $v=(3/5)c$.

*So,
the blue diamond edge $OF$ is the scaled up edge: it is $k$ times the corresponding vector on the red diamond,
and
the blue diamond edge $OB$ is the scaled down edge: it is $1/k$ times the corresponding vector on the red diamond.

*Thus, on a similarly-drawn energy-momentum diagram,
the 4-momentum of the more-energetic light-signal from the approaching source is proportional to $OF$ (see the vector $OM$ in my first answer),
and
the 4-momentum of the less-energetic light-signal from the separating source is proportional to $OB$.


Hopefully, this answer connects the Doppler effect
with "period" (and thus frequency)  and "wavelength", and thus the energy and momentum as components of the 4-momentum of a light-signal.
A: Let's say a photon is approaching from the left at speed c, and an object is approaching  from the right at speed -0.87 c.
When those two things collide, constant forces F and -F are exerted on them for time t.
The photon does work $ w_1=F * c/t$
The object does does work $w_2 = -F * -0.87*c/t$
So total work done in this collision is: $w=w_1+w_2=F*(1.87*c/t)$
The energy released in this collision is 1.87 times larger than energy released in a collision with an identical photon and a non-moving object.
If we change to the rest frame of the the object that moved at speed -0.87 c, all the energy released in the collision is in the photon before the collision.
Also said energy is gamma times larger in this frame.
So the energy of the photon in this new frame is: 2 * 1.87 * energy of photon measured in the old frame.
(The aforementioned collision is such that the speeds of both things can be considered to be constant during the collision, because one thing is massive and other thing is a photon, or maybe group of photons would work better in this case)
