The history of Transformers is something that proves, in an odd way, how interconnected the toy world used to be. Or, to put it in simpler terms: Blame everything on G.I. Joe. That always works.
Launched in 1980 by Japanese toy company Takara Toys, the Diaclone line was made up of robots that transformed into futuristic vehicles piloted by figures spun-off from their successful Microman line. The Microman line, imported into America by Mego as Micronauts, was in turn spun-off from a Takara line called Henshin Cyborg, which was itself spun-of from their Combat Joe line... which was made up from toys created from Hasbro's G.I. Joe line (See how it all comes together? Don't worry; Joe will pop up again later). In 1982, Takara expanded both the Microman and Diaclone lines by adding more transforming robots - except these new robots, branded Micro Change (for Microman) and Car Robots (for Diaclone), changed into more contemporary forms, like regular cars, planes and cassette players.
A year later, representatives from Hasbro attended the 1983 Tokyo Toy Fair. They were feeling good - their G.I. Joe: A Real American Hero line, launched a year earlier, was a big success, and they were looking for the next big thing. And, as soon as they saw Takara's Car Robots and Micro Change toys, they thought they'd found it. It wasn't as simple as all of that, however; for one thing, Hasbro didn't want to launch two separate lines onto the market at the same time, and so decided to consolidate the two together under the name Transformers. Having learned from their experience with G.I. Joe, they also knew that kids wanted a story to play along with, instead of just faceless toys, and so they decided to do exactly what they'd done before, and tell someone else to come up with one.
A little-known fact about the Transformers that we know and love: Their entire backstory was created by one of the most reviled men in the comic industry alongside the man who oversaw a phone vote to kill Robin the Boy Wonder. By 1983, Hasbro had built a close working relationship with Marvel Comics through their joint work on G.I. Joe, where Marvel editor Larry Hama was responsible for naming the characters and writing the backstory for each one (as well as the monthly Joe comic), so the toy company asked Marvel editor-in-chief Jim Shooter and editor Dennis O'Neil to come up with an entire Transformers universe prior to launching the toys, and they tried... only to see a lot of their ideas shot down by Hasbro as inappropriate. Frustrated, they gave the job to Bob Budiansky, whose revisions not only created Transformers canon, but also landed him the job of Transformers comic writer for years afterwards.
A huge success when launched in 1984, Transformers was almost too successful for Hasbro; to keep up with demand for new toys, they exhausted the Takara toys and started licensing figures from other companies, before finally coming up with original toys in 1986. While fading popularity led to the line being axed in the US in 1990, new Transformers were released internationally until 1993, when the entire line was relaunched internationally... and ever since then, they've remained in constant production under a variety of guises.