The Autobot/Decepticon War

The war between the Autobots and the Decepticons is what caused Cybertron to turn into a deserted wasteland, as the war eventually raged onto Earth.

History of the War
For generations, the inhabitants of Cybertron lived in peace, under the joint leadership of the brothers Optimus Prime and Lord High Protector Megatron. While Megatron was firm, Prime was fair, and the two personalities created a balance. That changed, however, when Megatron sought the All Spark, which gave life to all Transformers. He raised an army, the Decepticons, who sought the All Spark to give them the power to conquer other worlds. To counter Megatron, Prime raised his own army, the Autobots. Although the Autobots fought bravely, the Decepticons were the more ferocious warriors, and Megatron began to gain ground. In a desperate move, Prime sent the All Spark into deep space, and Megatron pursued it. Both crashed on Earth, and disappeared for many years. The war became a search for the All Spark, with the Decepticons, led by Starscream, searching for both the All Spark and Megatron.

Eventually, the Allspark was discovered on Earth, as the Autobots and Decepticons there have been fighting since the destruction of the Allspark.

The Time War
During the war, the Time Lords of Gallifrey were fighting against the Daleks of Skaro in a completely different war. In the Time War, the Decepticons believed the Daleks could be able to destroy both the Time Lords and the Daleks, but they never interupted the war, believing it would either bring a much worse fate to Cybertron or it could potentiallly create a paradox.