$$\require{cancel}$$

How does light behave as it travels through space? If we could focus light into a narrow beam, as with a flashlight, it would travel with undiminished intensity through space. But most light sources in astronomy emit their radiation equally in all directions, like a light bulb. Imagine light traveling away from a star in all directions. As electromagnetic radiation moves through space it covers a continually expanding area. The intensity of light per unit area therefore follows an inverse square law. Increase your distance from a light source by a factor of two and the intensity drops by a factor of four. Increase your distance by a factor of three and the intensity drops by a factor of nine.

Inverse Square Law. S represents an ideal source of electromagnetic radiation and A represents an arbitrary segment of the surface of a sphere of radius r. Click here for original source URL

The inverse square behavior of light fits both the wave and particle descriptions. For a wave, the energy in the wave is spread out over a larger area as the waves travel from the source. The area of a sphere is 4πR2, so the area covered by the wave increases proportional to R2 and the intensity of the wave at any point decreases proportional to 1/R2. Similarly, the best way to alleviate a loud noise is to move away from it! In the particle description of light, you can see that photons "thin out" as they move away from a light source. Since the photons stream out through an ever-increasing area, the number of photons passing through any particular patch decreases as the square of the distance from the source

Light is simply a form of electromagnetic radiation with a certain narrow range of wavelengths. The inverse square law applies to all forms of electromagnetic radiation. It describes how the signal falls off as you drive away from your favorite radio station or how the infrared radiation falls off as you move away from a warming fire. The force due to gravity also diminishes as the inverse square of the distance to the mass. Other forces or sources of energy in nature also follow an inverse square law -- electricity and magnetism are two more examples. There is nothing mysterious about this behavior. It is a geometric property of the space we inhabit. Any force or signal will dilute according to the inverse square of the distance it has traveled through space.