The fact that we can see the Sun and stars shows that light can travel over enormous distances (150 million kilometres from the Sun). In fact there is no known limit to how far light can travel. However, as you will be aware from observing torch beams or car headlights, there is a limit to the distance over which these are effective sources of illumination.
There are two reasons for this.
First, as light spreads from a bulb the level of illumination it provides is reduced (this is why a given source of light appears dimmer as you get further away from it).
Second, some of the light from the bulb will be scattered and absorbed by particles in the air and this further reduces the level of illumination it provides at any given distance.