Answer: it has to do with the earth. The earth rotates and spins around the sun. Therefore the sun “rises and sets” (we can see it) for around 12 hours
The sun rises and sets because of it's rotation on it's axis.
Explanation:
The sun makes a complete rotation after 24 hrs, as the earth rotates the sun moves past that part of the Earth not lighting it up anymore causing night time. So as the Earth moves towards the east the sun sets in the west causing it move out of our line of site