Throughout the history of Transformers movies and shows, there have been cases of transformers switching sides from either autobots to decepticons, or decpticons to autobots. If you don’t know what these groups are, autobots are known as a force for good, while Decepticons are a force for evil.
Wheeljack – (Autobot to Decepticon)

In Transformers: Armada, Wheeljack was left under heavy rubble on an intense battlefield. His friend, Hot Shot, promised to come back for him and get him help, but he never returned for his friend. Eventually, Megatron, (the Decepticons leader) saved Wheeljack. In return for this gracious act, he decided to join Megatron’s team with the Decepticons.
Eventually, Wheeljack ends up resolving things with his old buddy Hot Shot, but he never returns to being an Autobot.
Dreadwing – (Decepticon to Autobot)

This side switch takes place in Transformers: Prime. Dreadwing was a very loyal transformer to the Decepticons. Similarly to his twin, Skyquake, they were driven and guided by an extremely strict code of honor. This strict code made Dreadwing admire his opponent on the Autobots side, known as Optimus Prime. Another transformer named Starscream turned Dreadwings’ twin brother, Skyquake, into a “Terrorcon” which is some sort of zombie transformer. Dreadwing switched sides to the autobots to give them Solus Prime and once he went back to see the Decepticons to get revenge on Starscream for the death of his twin. That being said, when he went after Starscream, the leader of the Decepticons, Megatron, killed off Dreadwing instead.
Cliffjumper – (Autobot to Decepticon)

This switch also takes place in Transformers: Prime. Cliffjumper was not a willing betrayer of the Autobots, as he would sacrifice himself for the sake of everyone else. In one of the episodes, Cliffjumper is ambushed by the Decepticons and taken to the base where a character named Starscream kills Cliffjumper and turns him into a “Terrorcon” similarly to what happened to Dreadwing. Later on, Cliffjumper is killed a second time and is freed from being a Terrorcon zombie.
Deadlock – (Decepticon to Autobot)

In All-Hail Megatron, Deadlock was a Samurai sword expert. Deadlock has quite the sense of honor, but naturally, his values didn’t exactly fit in with the Decepticons, who had cartoonishly evil beliefs and ethos. Deadlock decided to go off and rebrand himself and change his Decepticon-given name to Drift, and change to the side of the autobots.