The cycle of sleep and wakefulness is one of the key human behaviours.
We spend about a third of our lives asleep and cannot survive without it.
When asleep, our brain memorises and processes information. Our body clears toxins and repairs itself, allowing us to function properly when awake.
Even short-term sleep deprivation significantly affects our wellbeing. Most of us begin to fall apart after just one night without sleep and after three nights of missed sleep, we are functioning way below par.
One study suggested that after 17-19 hours of staying awake, performance on cognitive tasks may be similar to having had too much to drink.
These effects worsen over time. The longest documented period without sleep of just more than 11 days prompted serious cognitive and behavioural changes, problems with concentration and short term memory, paranoia and hallucinations.
But while scientists have long understood the importance of getting enough sleep, the key part played by light exposure can sometimes be overlooked.
The reason light is so important is that it sets our circadian rhythm, or body clock, via specialised light sensors within the eye.
Our eye detects the light and dark cycle within our environment and adjusts the body's circadian rhythm so that the internal and external day coincide.
This is so powerful that that people who have very severe eye damage can find their body clock is thrown off, leading to sleep problems.
Without any access to light, the human body clock appears to drift, adding about half an hour on to its 24 hour cycle for each day of darkness.
Jetlag is the most obvious example of the effect light can have. Exposure to light in the new time zone helps reset our body clock to local time, telling us the right time to sleep.
In 1800, most people across the world worked outside and were exposed to the change from day to night.
Today, many of us miss out on these environmental cues as we work inside. Agriculture and fishing, for example, now make up just 1% of jobs in the UK.
We have become a light deprived species, and this has far reaching consequences for the quality of our sleep, and consequently our wellbeing. The optimum amount varies from person to person, but we do know that our bodies need exposure to very bright light that the majority of indoor lighting does not provide.
One notable side effect is Seasonal Affective Disorder (SAD), a form of depression thought to affect 2-8% of Europeans, which is linked to lack of sunlight exposure.
And there are many other areas where lack of natural light has caused problems.
While many of us aren't getting enough natural light, for nightshift workers it is a particular issue.
They have to work at a time when the body clock has prepared the body for sleep, and alertness and performance ability are low. They may try to make up on sleep during the day, but it will usually be shorter and of poorer quality.
In effect, they work when they are sleepy and sleep when they are not, and the negative health effects of this are only just being fully realised.
Over the long term, many aspects of health can be affected by nightshift working, which may shorten life spans by up to six years.
As many as 97% of nightshift workers fail to adapt to the demands of their work pattern, regardless of how many years they have been doing the job.
They are unable to shift their biology because the artificial light found in an office or factory is very dim compared to environmental light; by noon on a sunny day, natural light can be 250 times brighter than the light in an office.
When a night shift worker leaves to go home they are often exposed to this bright natural light, sending signals to their internal timing system that it is time to wake up.
In a Harvard study, night shift workers became completely nocturnal after being exposed to bright light in the workplace and then totally shielded from natural light during the day. But this is not a practical solution for most people.
Nursing home residents also often suffer from lack of sunlight.
Indoor light can be dim while residents often experience very little natural light, meaning poor quality sleep is a common complaint.
A Dutch study increased the light in the communal areas of a nursing home, while attempting to make bedrooms as dark as possible.
This appeared to reduce daytime napping and stabilise night-time sleep, which improved mental ability and sense of wellbeing.
Light deprivation is not just about the loss of bright natural light; it is also about the timing of light exposure.
Dusk light delays our body clock, making us get up later the next day. Morning light advances the clock, which makes us get up earlier.
When we worked outside this was not a problem; we were exposed to both dawn and dusk and so the two cancelled each other out.
But today many of us only experience part of the dawn-dusk cycle. This can be particularly true for university students, who tend to start the day later, and then spend more time outside in the early evening.
The dusk light delays their body clocks, meaning they are likely to get up and go to bed later. This is compounded by hormonal changes in adolescence and early adulthood which delay the body clock by about two hours.
The health consequences of smoking, alcohol and unprotected sex are well publicised, but the importance of sleep and the critical role played by light is arguably less well known.
Further research and greater awareness in this area could help individuals to make informed choices about prioritising their own sleep and getting enough sunlight. It could also influence the way that policies are developed by governments, educational institutions and workplaces.
Minimising light exposure before you go to bed, and trying to get us much morning light as possible, are simple steps that could help most people to regulate and improve their sleep.
About this piece
This analysis piece was commissioned by the BBC from an expert working for an outside organisation.
Russell Foster is a fellow of the Royal Society and the Academy of Medical Sciences. He is also a professor of Circadian Neuroscience and the head of the Nuffield Laboratory of Ophthalmology, which is part of the University of Oxford.
Edited by Eleanor Lawrie