This is how Thunderwing and Thunderwing's origins goes in Ryan's Kingdom.
[Thunderwing runs into a unicorn]
Rare Find: Are you friend or foe?
Thunderwing: I can assure you... I am no friend. I am Thunderwing, the most humble servant of Unicron, and I will take what should have been his long ago.
[Thunderwing then opens his chest to reveal a core and it consumes Rare Find's magic, causing the unicorn's eyes to lose their color and his cutie mark to vanish while making Thunderwing's gigantic form stronger]
[Celestia wakes up]
Princess Luna: Sister, are you alright?!
Princess Celestia: I've just had the most terrible dream.
Princess Luna: Why do you think I'm here? You know as well as I that this was not a dream, but a vision.
Princess Celestia: Then we haven't much time. The stronger he becomes, the more we are all in danger.
Princess Celestia: Thunderwing.
Princess Luna: The most humble servant of Unicron.
Princess Celestia: He's back.
[We see a book and pages flip until they reach a page with Thunderwing and Unicron on it.]
Princess Celestia: (voice) Thunderwing was created by his master, Unicron, many years ago to get revenge on his brother, Primus for banishing him from Cybertron.
Princess Luna: (voice) To do so, Unicron sent Thunderwing to Equestria to steal Equestrian magic.
Princess Celestia: (voice) Without their magic, the ponies of Equestria would be weak and defenceless.
Princess Luna: (voice) So Primus came to Equestria and defeated Thunderwing and locked him away in Tartarus and returned to space. And it looks like Thunderwing has found a way to escape Tartarus.