What causes daylight and night on Earth?

The earth rotates on its axis. As the earth turns, the sun irradiates the approximately half of the earth's surface exposed to it.