The events in Terminator dislocated the universe into three alternate realitiesIn the first one, no time travel ever happened, and the whole Skynet/Connor creating themselves paradox did not happen. With AI developing at normal speed without this shortcuts, mankind realized the danger soon enough and created failsafes to prevent the potential catastrophe. Blade Runner happens in this continuity. In the second one, the war against machines happened, and mankind won. But the nuclear war has turned the Earth into a wasteland, and raised the sea level. The survivors live piled up in supercities while most of the land is covered in nuclear deserts. Judge Dredd and Neon Genesis Evangelion occur here. In the third one, Connor was eliminated, and machines won the war. Afterwards, they created The Matrix, and that timeline eventually became the setting of Cars and The Jetsons. Not counting every series which takes place within the Matrix.
Battlestar Galactica takes place before all of these timelines, but in the same universe.150,000 years before Terminator, to be exact. The war against the machines, whatever the outcome, is the next phase of the never-ending cycle of human-Cylon conflict. All this has happened before, and all this will happen again.
Skynet is Primus, Earth is CybertronMillions of years after the events of Battlestar Galactica, the machines that rose up in Terminator and made mankind extinct have begun to deteriorate, and seeking to fix the problem, Skynet unlocked the secret to creating The Cube, which had unexpected side effects when actually pulled off. What The Cube eventually turned Skynet and its robot soldiers into would become known as the Transformers - Megatron is an eventual side effect of Skynet's resistance to this transformation. The Earth the Transformers travel to is simply the next one down the line. After all, this has all happened before and will all happen again - if Megatron has anything to say about it. Timey-Wimey Ball of The Sarah Connor Chronicles, Skynet was developed for Wall Street instead of the U.S.Army, thus becoming inclined to use financial tactics rather than nuclear bombs. Under the AI's discreet influence, the Cyberdyne Systems Corporation became the much larger Hyperdyne Systems Corporation and a privileged partner of the Resources Development Administration. Earth was slowly but surely transformed into a dead world where technology alone maintains human life. Networked computers became omnipresent, effectively making Skynet a planetary entity. History forgot all about John Connor, as Judgment Day never happened. Such was the situation when space marines discovered one of the Yautja's many hunting grounds: the distant moon Pandora, whose entire forests already had a mind of their own. The war between their Mother Nature and our Deus Est Machina has only just begun... Great, now I am guilty of Genius Loci Shipping.