Visibility
Flying VFR means that we need a minimum amount of visibility to fly safely to our destination. This visibility depends on a number of factors, they are all weather related and indicate the state of the air. Day or night makes no difference to the visibility or transparancy of air.
Aviation law requires a minimum flight visibility in all types of airspaces, ranging from 1 Nm and up. As pilots we must be aware of the visibility limiting factors so as to ensure a safe outcome of our flight.
Related factors
Visibility is the ability to see through air, its transparency if you like. It is measured horizontally. Clear clean air has a better visibility than polluted air with dust particles. Thus, how far a meteorological observer can see an object of a given size, regardless day or night, against a background. Sun or moonlight does not alter the transparency of the air.
A number of factors influence visibility, they are: precipitation, fog / mist, haze, smoke and in coastal areas sea spray.
Precipitation
Rain or snow will reduce visibility. It depends a bit on how heavy the precipitation is, drop or snow flake size and the intensity. A light drizzle will not hinder VFR operations (although commercial operations usually have higher limits) but heavy precipitation in Cb or TCu can reduce visibility to 100 meters or even less.
Fog / mist
Fog is visibility less than 1000 meters and mist, by definition, is visibility between 1000 and 5000 meters. Both have their origins in light suspended cloud droplets with a nearly 100% relative humidity and an abundance of condensation nuclei.
Haze
When visibility is reduced to 5000 meters or less by the presence of dust particles it is called haze. It is not related with cloud forming factors as is the case with fog or mist. When dust or sand particles are blown off and visibility reduces to less than 1000 meters it is referred to as a dust or sand storm, usually they go not higher than around 150 ft. In desert area's and with unstable air conditions (steep ELR) fine dust particles can go up to 8000 ft or higher and this condition can last for hours and having effects on other continents too.
In Europe it is not uncommon to experience sand dust from the Sahara carried by high altitude winds from the south and eventually raining down well into the northern parts of Europe.
Smoke / smog
Activity from industrial parts and fires in residential areas (think of wood fires, they are still being used in some parts of the world) add soot and carbon to the environment reducing visibility even more. Adding enough condensation nuclei to the air so that condensation will take place before reaching a RH of 100% and smog is formed. This was very common in certain cities in the last century.
Sea spray
Common in coastal areas, sea spray adds salt particles to the air thus increasing condensation nuclei and condensation can take place with a RH lower than 100% and thereby reducing visibility greatly. With strong onshore winds, reduced visibility can be experienced many miles inland.
Visibility range
The contrast of an object to its background has a great effect on its visibility, if contrast is low (for example a white building against a snowy white mountain) then the range at which objects can be seen is reduced. A clean and dry windscreen also helps increasing visibility range (and reducing accidents), as are clean sun glasses.
Illumination by the sun or the moon does not alter visibility, it does change visibility range. The best conditions occur when looking with the sun in your back (down sun) or towards the moon, one can see the silhouette of the objects better that way.
Slant range
Slant range is visibility under an angle, thus not vertical or horizontal. In low light conditions (end of the day) and with a haze layer, a pilot overflying an airport can easily see the runway looking down, but when turning onto final the angle is now slant and this reduces visibility greatly. Especially when flying toward the setting sun.
At higher altitudes, reaching space, the sky reduces in brightness. But the sun retains it brightness and this will result in a dazzling effect rendering the pilot unable to focus on objects. The eyes tend to focus about 3 meters out without the pilot knowing it, making it very difficult to detect other aircraft possibly on a collision course.

