The idea that sunspots are depressed slightly came as a possible explanation for the Wilson effect. The Wilson effect was discovered as the shape of sunspots as viewed from Earth changed as the Sun rotates, in a way consistent with the change in perspective looking onto a slightly depressed region. While this isn't the only explanation for the effect, it's certainly the most prevalent.
More specifically, as Solanki (2003) writes, the depressions indicate a lowering of the layer where the optical depth $\tau=1$ (keep in mind that the bottom of the photosphere is the layer where $\tau=2/3$). There are two causes mentioned: lower temperature and magnetic effects.
Sunspots are cooler than the surrounding areas, as is well known, and thus appear darker. We see the same thing apparent at the boundaries of solar granules: Cooler, darker gas sinks and lets the hotter gas (which is less dense) move upward. Additionally, the opacity $\kappa$ is temperature-dependent, which may impact how far one can see into the star.
Not only is temperature a factor, but so is the magnetic field. Sunspots are, at heart, a magnetic phenomenon, and thus the radial force equation is substantially different. Normally, in a star, the equation of hydrostatic equilibrium is
for pressure $P$, density $\rho$ and gravitational acceleration $g$. However, when the magnetic field becomes important in a sunspot on the solar surface, the force balance is
where $r$ and $z$ are the radial and vertical coordinates (note the change of coordinate system - $r$ is along the surface, and $z$ is perpendicular to it!). The force from the magnetic field implies a lower gas pressure and a greater depression.