The sun and moon rise in the east and set in the west.
When the player creates a new world, the time is set to dawn and the sun starts on the horizon. As time passes, it slowly moves across the sky. As the sun sets, the moon rises. Overall, daytime lasts 10 minutes (in real-time).
Sunlight
Screenshot of a skeleton burning in sunlight.
Sunlight is the light cast from the sky that burns various undead mobs during daytime. Mobs can shelter from the sunlight by staying underneath any block that does not fully let light through, like glass does, therefore creating a shadow. Clouds themselves do not cast shadows although when using vibrant visuals, clouds cast visible shadows but do not stop mobs from burning. During inclement weather, the sky darkens and reduces the amount of light in the world.
Strictly speaking, sunlight can be considered as the presence of both an internal sky light level of at least 12 and a sky light level of 15. Due to this, it is possible to burn undead mobs during rainy weather by covering them with glass.
Added day/night cycle with the addition of the sun and the moon.
The sun used to rise in the north, not in the east, and it was used to set in the south, not in the west.[1] This was a bug, but was left in the game for quite a while.[2]
Issues relating to "Sun" are maintained on the bug tracker. Issues should be reported and viewed there.
Trivia
The sun is visibly larger during sunrise and sunset.
If the player is underwater or underground and looks at the sun, it appears the same as the sun at sunset. This is due to the way the sun is rendered when exposed to the sky.
The sun viewed from high up, making it seem like the player is in space.
In Bedrock Edition, when looking toward the sun. The sky gets slightly darker and the sun slightly larger. (You may need to click the image to see it better.)
The sun would look like this, if the player looks away or if the world is heading into the night.
Sunlight influences shadows on entities in Bedrock Edition.
The previous screenshot from the opposite angle.
The texture of the sun from the default resource pack.
River running between forest and windswept hills biome with sunset in the background.
The sun sets over a rising windswept hills in the background.
Sunset over a desert and forest. A village can be seen on a hill on the left side.
Savanna and desert biomes in sunset.
Sunset over a desert with a village.
Sunrise over a jungle.
Looking down (in this case from Y:203) at night time, it's possible to see the sun under the sea, because the sun and the moon are on opposite sides of each other and due to the distance, the bottom of the sea despawns, leaving a gap where it can be seen.
The setting sun.
Official screenshots
The old round and square sun and moon textures.
Players relaxing beneath the sun.
References
↑"yes :(" – @notch (Markus Persson) on X (formerly Twitter), July 5, 2011