Why are photons being identical particles? Recently, I study quantum optics and deal with quantization of EM field in a cavity. We know we can express/quantize vector potential in terms of $\hat{a},\hat{a}^{\dagger}$ to get a quantized EM field in a cavity.
$$
\vec{A}(\vec{r},t)=\sum_{n,\sigma}\sqrt{\frac{\hbar}{2\epsilon_0\omega_n V}}\vec{e}_{n,\sigma}\Big[\hat{a}_{n,\sigma}e^{i(\vec{k}_n\cdot\vec{r}-\omega_nt)}+\hat{a}_{n,\sigma}^{\dagger}e^{-i(\vec{k}_n\cdot\vec{r}-\omega_nt)}\Big]
$$
The quantized Hamiltonian is:
$$
\hat{H}=\sum_{k}\hbar\omega_k(\hat{n}_k+\frac{1}{2})
$$
The eigenstate of quantized Hamiltonian is: $\left| n_1,n_2,n_3,... \right>=\left|n_1\right>\otimes\left|n_2\right>\otimes\left|n_3\right>...$ The state means there are $n_1$ photons in the first mode and $n_2$ photons in second mode and so on...
So every mode has it own number of photons and photons in the different modes are not at the same frequencies. But why do we take photons as indistinguishable particles?
 A: Calling photons indistinguishable particles is an artefact of thinking of them as fermion-like particles, rather than excitation quanta of electromagnetic field - the phrase is used to make the point to those (yet) unfamiliar with second quantization (see also this answer). If you take a specific mode of the field, with occupation number $n_k$, there is no way of distinguishing its $m_k$-th quantum from $m_k+1$-th or any other. But, since your already know how to quantize the field, this even does not come into question.
The photons in different modes (with different k-vectors, frequencies and polarization) are of course distinguishable.
A: The photon is a particle in the table of elementary particles in the standard model of particle physics.
The  elementary particles  can be distinguished by their quantum numbers from other type of elementary particles, but within a given type only interactions could offer a distinction from one particle to another. An electron is different from a muon because it has the electron lepton number, but electrons from other electrons can only differ in an interaction, where conservation of quantum numbers may lead to a continuity of identification.
Photons have the  spin quantum number. In an ensemble of same energy photons, where $E=hν$, if spin is not measured, they are indistinguishable, within the above definition.
Maybe this Feynman lecture helps.

By identical particles we mean things like electrons which can in no way be distinguished one from another. If a process involves two particles that are identical, reversing which one arrives at a counter is an alternative which cannot be distinguished and—like all cases of alternatives which cannot be distinguished—interferes with the original, unexchanged case. The amplitude for an event is then the sum of the two interfering amplitudes; but, interestingly enough, the interference is in some cases with the same phase and, in others, with the opposite phase.

