Although the curvature of the Earth's surface causes objects to be out of sight within 3.1 miles, the farthest object visible to the naked eye is the Andromeda galaxy, located 2.6 million light-years away from Earth. The amount of photons a distant object emits determines whether it can be seen.
The absolute threshold for a person to perceive an object is for the eyes to receive between 54 and 148 photons. Based on the photon absorption rate of the rod cells in the human eye, between five and 14 rod cells are required to be stimulated for the brain to perceive an object. With the brightness of a candle flame and the rate that it dims according to distance, this means that the human eye can perceive a dim candle flame up to 30 miles away and brighter lights even further than that.