As a follow up, when did they become the world standard?
I cannot answer about when they came to be, but I can tell you when they were last properly defined.
In 1875, the 20 May seventeen nations signed in Paris an international treaty called called The Metre Convention (la Convention du Mètre) in order to coordinate metrology (the science of measurements), at first they only handled weights and lengths, they also created the BIPM (Bureau International des Poids et Mesures or International Bureau of Weight and Measures) and established the CGPM (Conférence générale des poids et mesures or General Conference on Weights and Measures) and the CIPM (Comité international des poids et mesures or International Committee for Weights and Measures). The acronyms come from the French, which is the language of the BIPM. At that time they agreed on three units: the meter, the kilogram and the second (it was the MKS system). The second was defined as 1⁄86,400 of a mean solar day.
In 1921, following the idea developed by the Italian physicist Giovanni Giorgi around 1901, the treaty was expended to other physical quantities, the goal was to get a coherent system of units build on a small set of base units (it would become the International System of Units or SI). In 1956 the CIPM defined the second as the fraction 1⁄31,556,925.9747 of the tropical year 1900, it was ratified at the 11th CGPM in 1960. In 1967/88 at the 13th CGPM a new definition was taken and now the second is the duration of 9,192,631,770 periods of the radiation corresponding to the transition between the two hyperfine levels of the ground state of the caesium 133 atom. We can see that we reversed the logic here, before the second was a fraction of a greater duration, now it's a multiple of a smaller duration.
For the other part of your question the only rival I knew to them was defined, but never really used, by French (again) revolutionaries between 1792 and 1805. They loved the decimal system and wanted to use it everywhere. So a year was ten months of 30 days and they had five to six days added in order to keep them aligned with the Gregorian calendar, the weeks had guess what? Ten days. And each day consisted of ten hours, which were? Hundred (decimal) minutes long and each minute was 100 (decimal) seconds. They even made clock using this system but it didn't catch on so its mandatory used was rapidly abandoned.
I can talk about hours and to a lesser extent minutes. My primary sources are Time in History by Whitrow and Revolution in Time by Landes. I'm not a historian, but this is a topic that interests me a great deal.
In Western cultures, the idea of a twelve-hour day precedes the concept of a twenty-four hour day. The Romans inherited from the Greeks the idea of separating the period of daylight into twelve hours. For their part, the Greeks appear to have inherited the idea from the Egyptians, and we aren't 100% sure why the Egyptians opted for twelve hours. So, ultimately the answer to your first question is "Egypt". Cultures outside of what we would consider The West (such as Vedic India and ancient China) used their own versions of time periods less than one day.
Of course, the time between sunrise and sunset varies over the course of the year, and so too did the hour. In June, daytime hours were longer, and in December, they were shorter. Sundials, since they only track the motion of the Sun across the sky, produce uneven hours as a matter of course. Since almost everyone used sundials to track the time, variable-length hours seemed like a natural way to divide up the day.
This becomes more difficult when you try to mechanize timekeeping. For example, the ancient Greek astronomer and inventor Ctesibius (the C is silent, teh-SEE-bee-us) created a water clock that had the day and night hours marked with curves. The cylinder rotated throughout the year, making each hour shorter or longer depending on the date (and also making Ctesibius's device one of the earliest calendars independent of the stars).
It was the medieval Church that drove the demand for timekeeping independent of the sun. Clergy and monastics were (and still are) required to pray the canonical hours, a cycle of seven daytime prayers and one midnight prayer. In monasteries, this would be a communal gathering. For the earliest monks, gatherings would be announced by a bell or trumpet. You were simply told when to be there, and you showed up. Precision wasn't really a concern.
As the Middle Ages progressed, the abbots and bishops demanded greater and greater punctuality in the recitation of the hours, out of respect for God. Being late for Matins, the morning service ending around dawn, for example, was simply unacceptable. ("Frere Jacques, Frere Jacques, dormez vous? dormez vous? Sonnez les Matines...") This pressure, along with the need for someone to wake everyone else up for the midnight service, drove the development of more and more sophisticated water clocks. Writers published tables containing precise amounts of water for particular days and nights of the year. During the same period, these timetables also divided the hour into five segments (puncts) which were themselves divided into twelve more segments (osts), producing sixty-ost hours, equivalent to our modern minutes.
In the thirteenth century, someone (we don't know who) invented the anchor escapement and the modern geared clock was born. This is when the hour was finally equalized between day to night. This was basically a mechanical concern. It's just easier to make a clock with constant-length hours, especially when that clock is huge, public, and potentially at the top of a tower. Furthermore, there wasn't a good way to make a mechanical clock with an irregular beat that could easily ring a particular set of bells, the primary function of these devices. Other societies, like 16th century Japan, that didn't have these requirements did produce uneven-hour mechanical clocks with adjustable-length pendulums or moveable numbers, but that wasn't feasible in Europe.
These public clocks produced a huge change in the public's mindset about time. Prior to clocks, "how long until X?" was actually not an easy question to answer. Now that the question could be answered not only easily but precisely, new forms of business (like, say, meetings) could be arranged.
So next time you're stuck in an endless meeting, thank the medieval church that you at least know when it's over.
Edit: clarifying clepsydra details Big edit: Rearranged text