Seven is such a strange number. Ten or five are more intuitive maybe, so why seven? It's strange to me that all cultures seem to have arrived at the same system.
Seven is a natural length of the week for the astrologically-inclined - one day for each of the ancient "planets". That is, the things in the sky that are there regularly, but move relative to the "fixed" stars: the sun, the moon, and the five planets (in the modern sense) easily seen with the naked eye (Mercury, Venus, Mars, Jupiter, Saturn). In English, we have a mix of days named after Germanic gods and days named after planets - Monday = "Moon day", Sunday = "Sun day", Saturday = "Saturn Day". In most Romance languages, the day <-> planet relationship is clear. For example, in Italian, martedì (Tuesday) = "Mars day", mercoledì (Wednesday) = "Mercury day", giovedì (Thursday) = "Jupiter day" (at least, "Jove day"), and venerdì (Friday) = "Venus day".
Who were the astrologically-inclined who started this? As far as we can tell, the ancient Sumerians. The 7 day week then diffused north-east to Persia and west to the Levant, and continued to spread.
Ten and five are also natural choices, and both were used. Ancient China used 10 day weeks, which were also adopted by Korea and Japan. As 10 days is a quite long time if one has one day of rest per week, China and Korea ran the cycle of working days as half-weeks, i.e., they had a 5-day working week. China has an old decimal tradition, with 10 inches per foot, 10 ounces per pound, etc., and a 10 day week fits this well. The 7 day week appears to have reached China and been adopted in the 1st millennium AD. We don't know why it was adopted. (Maybe the government wanted to cut the days of rest in the work week from 20% to 14%?)
Ancient Egypt also used 10 day weeks. The 10 day week naturally gives rise to 30 day months of 3 ten day weeks, and 12 of these months is close to a year. (What to do with the 5 or 6 days to make up a full year? Have some extra days that don't belong to any month, and have a 5 or 6 day end-of-year holiday.)
Five day weeks were common across Central Asia; this tradition reached as far west as Assyria.
Five day weeks were also used in pre-Columbian Mesoamerica; these were combined as 4 to non-lunar "month" of 20 days, with 18 of these making 360 days, almost a year. Egyptian-style, the remaining days needed to complete the year didn't belong to a month or week. Unlike Egypt where these were somewhat of a festival, they seem to have been considered unlucky in America. In both cases, the people avoided working. Oddly to modern folk, the Aztecs used two calendars in parallel; the other had 13 day weeks in a 260 day cycle. (Having parallel calendars wasn't that unusual in the past - the Romans tried to run both 8 day and 7 day weeks in parallel, and some cultures have run lunar and solar calendars in parallel.)
The Celtic world appears to have used 8 day weeks (and called them "nine-nights", counting the both the beginning and ending nights). This 8 day week was also used in Italy, by the Etruscans and Romans (also counting the 8 as 9, like the Celts); they later adopted the 7 day week from the Greeks who spread it around the Mediterranean.
A variety of weeks have been used in Africa, the Igbo using 4 days weeks with 28 day months of 7 weeks, and others using different weeks, such as the Akan with 6 day weeks (called "seven days" via Celtic-style counting).
The revolutionary French in their great decimalisation project introduced 10 day weeks (and also decimal division of time within the day). While the metric system for measurements of length and mass stuck, their calendar and time reforms didn't. 10 might be a natural choice, but it's hard to overcome the inertia of custom (especially if people don't get a weekend as often!).