Daylight cycle

The day/night cycle is a 20-minute-long lapse between two main light settings.

Daytime
Daytime is the longest section of the cycle, lasting 10 minutes.
 * When a player first spawns on singleplayer in Infdev, Alpha, and Beta the cycle will always start right at the beginning of daytime. Vanilla multiplayer servers also start at the beginning of daytime, but the cycle ignores new players joining, so the cycle could be at any point when any particular player first spawn into a server.
 * Daytime features the Sun and a light blue sky. This color depends on the biome you are currently in. Deserts and Forests have a turquoise sky, while Tundra and Taiga have a more blue sky.
 * During daytime, all blocks that are in direct vertical view of the sky receive daylight, the strongest light possible, which is light level 15.
 * Daylight provides ample light for the growth of all trees and crops.
 * Zombies and Skeletons in direct view of the sky (and not in water) during daytime will be set on fire. Additionally, Spiders in direct view of the sky that are not already aggressive will become neutral, and Endermen in direct view of the sky will teleport randomly when near the player and become neutral if aggressive.  Creepers are the only naturally-spawned hostile Overworld mobs that are unaffected by sunlight.

Sunset/Dusk
Lasts 1 and a half minutes.
 * A period between daytime and nighttime, when the Sun sets on the West horizon, and the Moon rises on the East horizon.
 * The light level of all blocks that are in direct vertical view of the sky and are not lit by other sources decreases by 1 every 10 seconds.
 * The sky near the setting Sun will have a red glow when the Sun sets.
 * Actual time of Sunset will not change if the texture for the Sun is changed. The day/night cycle will be the same length with the same effects even if the Sun is visibly larger or smaller.
 * The Sun will also get visibly larger when it sets.
 * Between dusk and dawn you may sleep in a bed. Doing so will advance the day-night cycle to dawn.  Time doesn't pass with regards to other aspects of the world, though.  Crops won't grow, and items in furnaces won't cook, for example, although active weather effects usually stop.

Nighttime


Lasts 7 minutes.
 * During nighttime the world is covered in darkness with a light level of 4 and hostile mobs may spawn on the surface.
 * Nighttime features the Moon, and a dark blue sky, with white stars.
 * The stars at night appear to move with the moon, and can be seen in The Void at dawn and dusk.
 * During the night crops will still grow (unless player sleeps through night).

Sunrise/Dawn
Lasts 1 and a half minutes. Note: This Only applies to zombies and skeletons."
 * A period between nighttime and daytime, when Moon sets on the West horizon and the Sun rises on the East horizon.
 * All blocks that are in direct vertical view of the sky get 1 shade of lighting brighter every 10 seconds.
 * The sky near the rising Sun will have a red glow when the Sun rises.
 * The Sun will slowly shrink to its 8x8 pixel size while rising.
 * Night mobs will begin to burn.

Clock
In the Halloween Update, Notch added a clock that lets you tell the time in the Minecraft world. It's crafted like this:

Clocks are useful underground where the current day/night cycle is not visible. They help the player avoid mistakenly surfacing at night and falling prey to night-spawned surface mobs.

''Note: The clock will spin uselessly in The Nether and The End. There is no day-night cycle there.''

Trivia

 * The Sun and Moon rotate around the player, not the center of the map.
 * In the Minecraft sky, the Sun and Moon always appear in the same position relative to the stars.
 * When a star is in clear view it will appear over the cross-hair.
 * Day and night do not simulate when the game is paused in single player.
 * Passage of time in the game generally stops when you alt-tab away (or ⌘+Tab) from the game (due to the menu appearing). To get around this, you can open a chest, your inventory, or a furnace, or even a dispenser. This will prevent the menu from appearing when you switch tasks, allowing for time passage while you're in a different window.
 * Notch mentioned on his Twitter that the Sun actually rises in the north in Minecraft. This was a bug and was fixed in Minecraft Beta 1.9 prerelease 4, so the Sun and Moon now both rise in the east.
 * In the leaked 1.8 pre-release version this could be changed by pressing F6 (reverse time) and F7 (advance time) which allows you to manipulate the time of day/night.
 * After Beta 1.9 Pre-release 4, lunar phases were added.

Time Measurements
The following are approximations of Minecraft Time to Real Time:


 * 1 Minecraft Second ≈ 0.013 seconds of gameplay.
 * 1 Minecraft Minute ≈ 0.833 seconds of gameplay.
 * 1 Minecraft Hour = 50 seconds of gameplay.
 * 1 Minecraft Day = 20 minutes of gameplay.
 * 1 Minecraft Week ≈ 2.333 hours of gameplay.
 * 1 Minecraft Month = 10 hours of gameplay.
 * 1 Minecraft Year = 121.75 hours of gameplay, or 5.07 days of gameplay.

The approximation of Real Time to Minecraft Time:


 * 1 hour of gameplay = 3 Minecraft Days.
 * 1 day of gameplay = 72 Minecraft Days.
 * 1 week of gameplay ≈ 1.5 Minecraft Years, ≈ 17 Minecraft Months, = 72 Minecraft Weeks, = 504 Minecraft Days
 * 1 month of gameplay ≈ 6 Minecraft Years, = 72 Minecraft Months, ≈ 308.5 Minecraft Weeks, = 2,160 Minecraft Days
 * 1 year of gameplay = 72 Minecraft Years, ≈ 876.5 Minecraft Months, ≈ 3,757 Minecraft Weeks, ≈ 26,297.5 Minecraft Days

Months are assumed each month is 30 days long. Years are rounded off to 365.242199 days, and all close (contains ≈) measurements are rounded to the nearest thousandth, or 0.00x.