The rotation and spinning of the Earth causes the Sun to vanish at night. The Sun is continually shining and illuminating the Earth. However, it cannot supply light to the entire Earth at the same time. Only a small part of the Earth gets direct sunlight at any given moment because most of it is covered by water or land. Therefore, during nighttime only the portion of the planet that is directly illuminated by the Sun is able to reflect some of this light back toward space.
At first glance it might seem that the Sun could still be giving off light even though we can't see it, but this is not true. All of the particles that make up the Sun are moving very fast and any light they emit is caught before it has time to leave.
Light travels in waves called photons. When a photon hits an object that has different properties than what it is made of (such as a wave hitting a rock), it is transmitted through it without being absorbed. The only thing that changes when light encounters an object is its direction; it continues on its way unaltered. So all the energy from the Sun reaches Earth even though we can't see it.
Photons are particles that are emitted by atoms in response to a change in their spin state. An electron orbiting an atomic nucleus moves around in slightly irregular orbits, constantly changing length.
The rotation of our planet causes day and night. When the sun is visible in the sky, light from the sun may reach us, indicating that it is daylight. When the sun sets, the sun cannot shine on us, and we are left in the dark. The only thing keeping us alive is the heat from our bodies which keeps us warm during these periods when there is no sunlight.
Day and night happen because we are not looking at the whole picture. Day comes when the earth is facing the sun, but not all parts of the earth are exposed to direct sunlight. There are clouds overhead that block out the sun. This is why daytime is greater than nighttime. If everything was like a clear sunny day then nighttime would be just as long as daytime.
Nighttime also includes the part of the day when the moon is out. While the moon isn't actually giving off any light itself, it is still able to affect things around it. For example, if there were no moon, then there wouldn't be any stars either. The reason why there are stars even though the moon isn't out is because they are reflected in something else: windows. Windows are areas where some of the atmosphere has been removed so that you can see outside. Since this something else is reflecting all of the stars, even though the moon isn't out yet, you can see stars during nighttime.
As a result, we have day and night. The Earth spins on its axis as it revolves around the sun. The side of the planet that faces the sun receives a lot of light and heat (daytime). But the other half of the planet shuns the sun's influence (nighttime). All together, this creates the seasons we know today.
There are two reasons why the amount of daylight changes over the course of the year. First, the angle at which the Earth is tilted with respect to the sun changes during the year. Because of this angle, more of the sun's rays strike the northern hemisphere than the southern hemisphere during part of the year. Second, where you live affects how much daylight there is each day. If you live in the northern hemisphere, you will experience more daylight in the summer than in the winter because the sun is closer to the horizon in the winter and can be seen for longer periods of time.
Where you live also determines what time it gets dark. In the northern hemisphere, if you're away from cities then you will probably see the sunset and rise of the moon. But if you're near a city at mid-latitudes or higher, then it might not get completely dark every night. These places use lights at night to save energy or because they have to keep traffic moving under certain conditions.