Some societies experimented with other lengths of week, but It seems likely that the 7 day week originated and predominated in Babylon mainly because of the lunar cycle which gave the Babylonians 4 easily identifiable phases (New Moon, waxing Half Moon, |Full Moon and waning Half Moon), each of about 7 days. These phases (and hence weeks) allowed the ancients to plan and schedule events for particular times within each phase (hence particular days).
The Romans adopted this system and the Empire, and subsequent Christian influences, spread the 7 day week throughout Europe. Rome also applied the names of 7 Planet-Gods to the days, and it is these names or their Norse equivelants which survive to this day as the English names of the days.
I have just written a hubpage on the subject of the naming of the days of the week. Hope you can check it out, and find it helpful. Alun.