The establishment of a 24 hour day goes back to ancient times. How ancient? How about 4000 years ago!
Of course, we can't interview one of those that came up with the concept, but the common belief is that the 24-hour day was created by the Babylonians (inhabitants of Babylon, a city about 60 miles South of modern Baghdad).
Try counting the number of segments in each of your fingers (except your thumbs). Each finger has three segments, accounting for 12 total in each hand: 12 in one hand for day, and 12 in the other for night. The Babylonians were also enthralled with the number 12 because there are 12 "full moons" in a year.
Probably because they were outdoorsy-kinds of people, the Babylonians were aware of five of our planets: Mercury, Venus, Mars, Jupiter, and Saturn (all of which they could easily see without a telescope while lying under the stars on those warm desert nights.)
The Babylonians actually set up a number system with 60 possible values consisting of 59 digit symbols and a blank. The advantage of the number 60 is that it is easily divisible by 1, 2, 3, 4, or 5. Divide 60 by 5 and you have 12. (They also divided the sky into the 12 ancient signs of the Zodiac.)
Their fascination with a number system of 60 symbols might also explain why we have 60 minutes in an hour, and 60 seconds in a minute. How about 360 degrees in a compass (6x60)?
And, why do we have seven days in a week? Start with the Sun and the Moon, then throw in the 5 planets: Sunday (sun), Monday (moon), Tuesday (Mardi, for Mars), Wednesday (Mercredi, for Mercury), Thursday (after Thor, the Norse god for Jupiter), Friday (after Freya, the Norse god for Venus), and Saturday (after Saturn).
I suppose if we lived on Mars we'd celebrate Earth Day once a week!