How far we can see depends on many factors.
There is an “absolute threshold” of vision, which is the minimum number of photons that must strike our retinas to make a visual perception.
Many studies have been done on our visual absolute threshold. Scientists have concluded that the average person can see a glimmer of a candle flame up to 30 miles away! We can see headlights of a car from two miles away.
The farthest object visible with the naked eye is the Andromeda galaxy, which is 2.6 million light-years from earth. It has 1 trillion stars, which our retina can see even from that distance. How is that possible? The stars are emitting so many thousands of photons that they can stimulate our retina even from that distance.