Circadian clocks enable all living things to schedule their days so as not to be caught off guard by sunrise and sunset. Not only is there a master clock in the human brain to synchronize sleeping and waking with light, but there are circadian clocks in nearly every cell in the body, according to Barbara Helm, a chronobiologist at the University of Glasgow in Scotland, explains an article by Tina Hesman Saey in Science News (https://www.sciencenews.org/article/origin-biological-clocks).
Internal circadian clocks set sleep patterns and meal times and regulate biological processes, such as the flow of hormones, the body's response to sugar and others. Creatures probably developed circadian clocks to protect their fragile DNA from the sun's damaging ultraviolet rays. While many scientists favor the view that multiple organisms independently evolved their own circadian clocks, each reinventing its own wheel, other researchers think there had to be one master clock from which all others came. It evolved to protect the cell from oxygen damage or provide other advantages.
As the National Institute of General Medical Sciences explains, circadian rhythms are physical, mental and behavioral changes that follow a roughly 24-hour cycle, responding primarily to light and darkness in an organism's environment. Biological clocks drive circadian rhythms. The biological clocks that control circadian rhythms are groupings of interacting molecules in cells throughout the body. A "master clock" in the brain synchronizes all the body clocks. The "master clock" that controls circadian rhythms consists of a group of nerve cells in the brain called the suprachiasmatic nucleus, or SCN. The SCN contains about 20,000 nerve cells and is located in the hypothalamus, an area of the brain just above where the optic nerves from the eyes cross (http://www.nigms.nih.gov/Education/Pages/Factsheet_CircadianRhythms.aspx).
According to Science News, circadian clocks are composed of RNA molecules and proteins that oscillate in abundance. At certain times of day, some clock proteins produce messenger RNA, used by the cell to make fresh batches of other clock proteins. When those proteins reach a certain threshold, they stop creation of the messenger RNA that produces them. The proteins disintegrate or get destroyed by other proteins until their levels fall below a threshold. That signals the need for another batch, and the cycle starts again.
Circadian clocks are necessary for the survival of most organisms living on earth's surface. The idea that organisms are doing a "flight from light" comes from the fact that cells often replicate their DNA at night safely under cover of darkness and repair it during the day when UV light damage accumulates. Some of the protein cogs that drive the circadian clocks are also involved in DNA repair, further cementing the connection, the Science News article concludes.