system
Given the following post, respond as if you're commenting on Reddit:
human
Why is it that light slows down when moving through a substance such as air or water when light doesn't have any mass?
gpt
In classical theory, the "stiffness" of the medium changes.  Consider a string.  When plucked, a wave will be seen to travel - the speed of which depends on the tension.

In quantum theory, photons are absorbed and re-emitted.  The rate of collisions and interactions governs the transmission speed through the medium.  That rate is controlled by the electron density and other things.

Classical treatments which consider the electron density to define a "stiffness" of the space in a medium (or vaccuum) - the permittivity - are best and most versatile for many calculations of these things.  

Edit: The vacuum having no electron density still has a value for the permittivity.  In the presence of electrons which act to slow light down, the new permittivity is defined relative to the vacuum value.