Time Zones were created to synchronize time all across the world. Believe it or not, until about the 19th century there were no central time standards. Every town, city or location kept their own time and usually stayed in sync thanks to a clock tower or large clock placed somewhere accessible to all.
Many different tools were used to measure time, including the pendulum clock which was first created in the 17th century. People still used the sun, as it rose and set, to measure the time of day.
However, in 1764 John Harrison -- an English horologist -- made a big discovery. He realized that clocks could be used to discern the location of a ship at sea. Even better, he realized it could be done much more accurately than any current measurements they were using at the time. Thanks to his discovery the Act 5 George III -- or the Longitude Act -- was adopted to draw up the concept of longitude we still use today.
Although this addressed some issues regarding time and made it easier to locate ships out at sea, many places around the world continued to use the sun's movements as their standard for timekeeping. As you can imagine, this caused quite a bit of fuss when railways were adopted and telecommunications became popular.
American railroads, in particular, ran into a lot of issues in the 1800s, as each train station operated independently -- all of them used their own time standard. It's not difficult to understand why this would be a problem, especially considering trains were meant to run on a schedule and both depart and arrive at specific times.
The Library of Congress was required to keep track of well over 300 different local times and travelers would need to be mindful of each one during travel. The railroad committees and managers tried to remedy this by slimming it down to 100 different time zones, but ultimately that didn't solve anything.
So, four standard time zones were chosen for the continental United States and put into effect on November 18, 1883. By that time Britain had already adopted their own time standards, using the Greenwich Meridian as their point of origin.
The International Meridian Conference
Held in October, 1884 in Washington DC -- in the United States -- the International Meridian Conference discussed a proposal that would see the Greenwich Meridian as the "Prime" meridian and Greenwich Mean Time (GMT) as the entire world's time standard. All time zones in the world would refer to the GMT zone and the prime meridian to ensure a fully synchronized time standard. Since then we've used the form of time zones we have today.
This is also where the international 24-hour time system comes from.
What is a Time Zone?
Time Zones In Europe