$m$ in Klein-Gordon Equation The Klein-Gordon equation is given by
$$
(\square + m^2) \phi(x) = 0
$$
where $\square$ is the d'Alembertian operator, $m \in \mathbb{R}$ and $\phi$ is a scalar field. 
Question: What is $m$ in the KG equation? Is it just a real number? How is it related to the scalar field $\phi$?
If $m=0$, then KG equation becomes 
$$
\square \phi(x) = 0.
$$
A general solution to this equation is given by
$$
\phi = \int \frac{d^3p}{(2\pi)^3} \left( a_p e^{-ipx} + a_p^* e^{+ipx}\right)
$$
where $p^{\mu}$ is a constant $4$-vector. 
In Lorenz gauge condition (i.e.; $\partial_{\mu} A^{\mu} = 0$), Maxwell's equation in free space (i.e., $\partial_{\mu} F^{\mu\nu} = 0$) reduces to 
$$
\square A^{\nu} = 0.
$$
$A^{\nu}$, the electromagnetic field, can also be expressed by the same expression for $\phi$. The electromagnetic field is called a massless vector field for each polarization. 
Question:
How does the zero mass of photons be related to the form of the equation $\square A^{\nu} = 0$ where $m=0$?
 A: Once you start thinking about relativity, gauge fields, qft, etc, it's easy to forget that the massless KG equation is actually just a fancy name for one of the simplest and most common equations in physics: 
$$ (\partial_t^2 - \partial_x^2) \, \varphi = 0 , $$
the wave equation!
The most familiar example is waves on a string. Here's the answer in that context:
$$ (\partial_t^2 - \partial_x^2 + m^2) \, \varphi = 0 $$


                          

With $m=0$ you are talking about waves on a string, where each little string segment is coupled only to its neighbors. (We call this the "wave equation".)
With $m\neq 0$ each little string segment has a harmonic restoring force back to its equilibrium displacement, in addition to neighbor coupling. (I'd call this the "wave equation with dispersion").
The value of $m$ tells you the strength of the harmonic restoring force at each point, relative to the strength of neighbor coupling.
Okay, so why "massive" and "massless"? A few reasons.
Look at the dispersion relation $\omega = \sqrt{k^2 + m^2}$.


*

*In quantum mechanics $\omega \sim E$ and $k \sim p$, roughly speaking. Translating, the dispersion relation looks like $E = \sqrt{p^2 + m^2}$ which is the relativistic energy for a particle with rest mass $m$.

*Normalized wavepackets have a minimum total energy $m$. (This might not strictly be true but the idea is right. Didn't feel like working out proof. The point is that in Fourier space (at a fixed time) you're summing up energies related to $\omega(k) \geq m$.)

*Group velocity of all wavepackets is $c$ (of course $c=1$ here) if $m=0$. If $m>0$ all wavepackets have group velocity less than $c$. In the massive case $m>0$, low energy normalized wavepackets just sit still (all "rest mass" energy, no kinetic energy), whereas very energetic normalized wavepackets move almost at $c$ (high kinetic energy).
When you go quantum, the properties 2 and 3 of classical wavepackets basically translate to the corresponding properties of quantum excitations.
So basically the answer to your second question is: Because the KG dispersion relation corresponds to the relativistic energy equation for a particle of rest mass $m$, and the associated wavepacket dynamics agrees with the analogy as well.
I'm sure there are many more ways to think about this, some mathematically more rigorous, but I think they're all fundamentally related to that basic fact and the properties above.
A: The answer is simply that m represents the mass. The KG equation is the wave equivalent of Einstein's energy momentum relation $E^2 = m^2c^4+p^2c^2$.
A: Assume that we are treating about a massive spin-1 field (massive boson), the appropriate action for that field is the Proca Action, which varying that Action gives the Proca-equation.
which is equivalent to the following form:
$(\partial_{\mu}\partial^{\mu}+m^2){A^{\nu}}=0$
And $A^{\nu}=({\phi},A)$, where ${\phi}$ and $A$ are generalized scalar and vector fields, respectively.
In the case that only the time-component (the scalar field) is non-vanishing, we obtain an equation that is of the form of the Klein-Gordon equation i.e.
$(\partial_{\mu}\partial^{\mu}+ m^2) \phi = 0$
where $\phi$ is some scalar field. solutions for that equation with $m=0$ are similar to the massless Proca-equation with non-vanishing spatial-components of $A^{\nu}$.

Question: How does the zero mass of photons be related to the form of
  the equation $\square A_{\nu}=0$ where $m=0$?

In the massless case i.e. $m=0$, you obtain maxwell-equations in Lorenz gauge that describe the photon.
$\partial_{\mu}\partial^{\mu} A^{\nu} = 0$
A: We start with a free scalar field Lagrangian $\mathcal{L}[\phi, \partial_{\mu}\phi]$:
$$
\mathcal{L} = \frac{1}{2} \partial^{\mu}\phi \partial_{\mu}\phi - \frac{1}{2} m^2 \phi^2
$$
where, $m$ is called the mass of the scalar field $\phi(x)$. The corresponding Euler-Lagrange equation is the Klein-Gordon equation $$(\Box + m^2)\phi = 0$$ where $m$ is the mass of the scalar field $\phi(x)$. 
Now I will discuss how mass $m$ of the scalar field $\phi(x)$ is related to the mass $m$ of a particle.
We solve the Klein-Gordon equation and promote the solution $\phi(x): \mathbb{R}^{1,3} \rightarrow \mathbb{R}$ to a family of operators (parameterized by the space-time point $x$) $\hat{\phi}(x)$ on a Hilbert space $\mathcal{H}$. The quantization procedure leads to the following definition:
$$
\hat{a}^{\dagger}(\textbf{k})|0\rangle = |k\rangle,
$$
where $k$ is the 4-momentum. We interpret $|k\rangle$ as it represents a free particle with moemntum $\textbf{k}$, mass $m$ and spin $s=0$ (i.e., a boson). Note that $m$ is the parameter appearing in the free scalar field Lagrangian $\mathcal{L}[\phi, \partial_{\mu}\phi]$.
A: Schrodinger discovered the KG equation before he discovered the equation named after himself. He discarded it as he could not develop an interpretation of it that was physically plausible. 
The KG equation is found by quantising Einsteins energy-momentum relation and there $m$ represents mass and likewise after quantisation in the KG equation itself. 
