Photons are bosons, so their modes and waves can be described by the Bose-Einstein distribution:
$$f(E) = \frac{1}{e^{\beta (E - \mu)} - 1}$$
where $\beta$ is the thermodynamic constant $\beta\equiv 1/k_B T$ and $E$ is the energy of each particle in a mode or $E = h\nu$. Let us also describe this from a quantum mechanical persective. A harmonic oscillator cannot just have any amount of energy but moves up in discrete steps such as
$$E_n = 0, h\nu, 2h\nu, \dots , nh\nu.$$
The partition function of this is given by
$$Z = \sum_{\alpha}e^{-\beta E_{\alpha}} = 1 + e^{-\beta h\nu} + e^{-2\beta h\nu} + \dots + e^{-n\beta h\nu} = \frac{1}{1 - e^{-\beta h\nu}}.$$
The average energy in this case is
$$\bar{E} = -\frac{1}{Z}\frac{\partial Z}{\partial \beta} = \frac{h\nu}{e^{\beta h\nu} - 1}.$$
Energy comes in these units of $h\nu$ as we have seen. Thus, the average number of these units of energy is given by the distribution of
$$f(E) = \frac{1}{e^{\beta h\nu} - 1}.$$
This is called the Planck distribution and is used to describe photons (note that the Bose-Einstein distribution is derived very similarly). If we compare the Bose-Einstein distribution and the Planck distribution that we have just derived, we see that the chemical potential is $\mu = 0$.
Now, regarding your second question, this is what gives us more intution of why the chemical potential of gases are zero. The number of photons in a system $N$ is not constrained but will rather take whatever number that will minimize the Hemoltz free energy $F$ (assuming that $T$ and $V$ are constant). If $N$ changes infinitessimally, then $F$ will change as well or:
$$\left(\frac{\partial F}{\partial N}\right)_{V, T} = 0$$
in the equilibrium state. But let's think for a second. We now that
$$\text{d}F = -p\text{d}V - S\text{d}T + \mu \text{d}N\implies \mu = \left(\frac{\partial F}{\partial N}\right)_{V, T}.$$
That means that the chemical potential is zero!
If you have any questions, please comment below and I'll try to answer.