The Overworld has a day/night cycle, which lasts 20 minutes from one sun rise to another. This cycle changes the light levels, the color of the sky and the way mobs spawn and react to the player.
A cycle is usually divided into either day and night or into day, night, dusk and dawn, which is more accurate. Daytime lasts about 10 minutes, night about 7 minutes and both dusk and down last about 90 seconds.
During daytime the sun can be seen in a light blue sky and emits a light of level 15. Passive mobs can spawn, if the areas meet their specific requirements, and hostile mobs will only spawn in dark areas, like caves. The sun provides enough light for plants and trees to grow, though it’s too bright for mushrooms.
Skeletons and zombies will catch fire if they’re exposed to sunlight coming from directly above them, though being in water will extinguish the fire. They can also move into any shaded area, like under a tree. Endermen and spiders will become neutral, though spiders will remain aggressive if they were already attacking the player. Endermen will also teleport when a player gets too close to them.
During nighttime the moon and stars can be seen in a dark blue sky. The moon will emit a light of level 4. Passive mobs will no longer spawn, though they will not despawn. Instead they look for any light source close around them and gather around it. Hostile mobs can now spawn everywhere, as long as their specific requirements are met.
The moon doesn’t provide enough light for trees and plants to grow, though as long as the plants are exposed to the sky, the plants and saplings will not pop out of the ground. Plants normally uproot when light falls below level 9, but if they’re exposed to the sky directly above them, all plants will remain rooted.
Mushrooms will spread around, though most of them will have popped out of the ground during the day. Players can sleep during any time at night, which will skip the time to dawn.
The sun rises in the east and slowly emits more and more light. The sun starts out larger in size and will slowly shrink to its daytime size.
The sky around the sun emits a dull orange light which slowly turns into light blue. Depending on the light level, any mob can spawn if their spawn requirements are met. However, skeletons and zombies will start to catch fire and run for water or shade.
Players will still be able to sleep in their beds, though it’ll only advance time by a small amount, which makes it quite pointless.
The sun sets in the west and slowly emits less and less light. The sky around the sun will slowly turn a bright orange before slowly turning dark blue and the sun will grow a little in size. The light level will slowly decrease from 15 to 4 in about 90 seconds.
Depending on the light level, any mob can spawn if their spawn requirements are met. Players will be able to sleep in beds from this point.
Clocks can be crafted and used to tell the position of the sun and the moon, which tells you what time it is. The disk in the clock will slowly turn clockwise as time progresses. Note that clocks do not work in the End and the Nether, as these dimensions have no day/night cycle. Instead, the clock will simply spin around randomly.
In the game options there is a setting called brightness, which will obviously change the brightness of your screen. If you set it to the lowest setting, nighttime will be very dark and moving around will be almost impossible as it’s very difficult to see anything. Turning it all the way to maximum will let you see pretty much everything at night, even most far away details. Note that brightness does not affect the actual light level, nighttime light in both minimum and maximum brightness will always be level 4 light.