By "Light", I assume you mean visible light. visible light is apart of the electromagnetic spectrum, and is itself, an electromagnetic wave.
An electromagnetic wave is a component of the electric and magnetic field, caused by the condition that: $$\frac{\partial \vec{J}}{\partial t} ≠ 0$$
When a charge accelerates, an electromagnetic wave is emmitted.
This wave consists of an electric component and a magnetic component
In the simplest form, for a point source of radiation
$\vec{E} \propto \frac{1}{r} $
$\vec{B} \propto \frac{1}{r} $
Meaning the strength of the Electric and magnetic field components decrease as the wave travels further away.
The poynting vector: $\vec{S} = \frac{1}{\mu_{0}} \vec{E} × \vec{B}$
Denotes the power radiated per unit area. Aka the rate of energy flowing as a result of the EM wave.
Meaning,
$\vec{S} \propto \frac{1}{r^2}$
There is an inverse square law for power radiated.
The rate at which energy flows is inversely proportional to the square of the distance from the source.
The total energy is constant however, as although the energy flow is less the further away you get, the energy is spread over a larger area.
Roughly speaking, calculating the total flow of energy around a spherical surface around the source, the area grows like $r^2$ while the poynting vector grows like $\frac{1}{r^2}$ causing the total rate at which energy flows across the sphere to be constant
$\iint \vec{S} \cdot \vec{da} = $ constant
For all spheres of any radius (growing like ct)
No energy is lost. But the energy flow at any point in space DOES decrease.
Although the flow of energy follows an inverse square law, for any finite distance, you should be able to detect the light.