Tempest Shadow is a powerful unicorn, and the former general of the Storm King's army. After her horn was broken and her face scarred, she started to be feared by other children her age. A broken horn meant unstable, often dangerous magic, and the lower-class town didn't have any doctors that could figure out a way to curb her outbursts. Tempest herself was an orphaned filly living in a foster home, so they couldn't afford to get an expert from the city.
The horn of a unicorn is the outlet for their magic. With enough force a horn can be broken, and when it does, the victim can experience chronic migraines, dizziness, and uncontrollable magic bursts. After being attacked, Tempest tried her best to go back to the way things were, but the lack of control she had over her magic made her dangerous — the parents and guardians of her friends, along with some of the kids themselves, told her she was a hazard. After several years, and many broken relationships, Tempest decided she had enough and ran away.
Decades later, after the Storm King loses against Twilight, Tempest decides to redeem herself by traveling to the lands he had conquered and spreading the news of the King's defeat. She and Grubber also spent several years helping these lands recover from the King's rule. Tempest and Twilight kept in touch, sending each other letters whenever they could.
Upon her return to Equestria and Ponyville itself, Tempest Shadow and Grubber were happily welcomed back by the Mane Six, who wanted to hear all about the places they went to and the creatures they helped. During their visit they stayed in some spare rooms Twilight had in her castle, spending plenty of time with the purple pony and her assistant Spike. Tempest made the decision to become Twi's personal guard, staying by the princess' side.
Spending so much time together, it wasn't long before the two mares started to develop feelings for each other. Unfortunately neither pony was very good at confessing their feelings. Twi's an anxiety ball and Tempest would just get flustered and quiet. Thankfully, all it took was a wonderful little date night (set up by Rarity of course) to gently push the love birds to their confession.
Years later, Twilight and Tempest are happily married and live in the Ponyville castle with their son Berry Burst, Spike, Grubber, Gabby, and Motley.
The device on Tempest's forehead is actually a magical stabilizer, developed by Twilight and Sunburst. The enchanted metal and gemstone provide a little bit of an outlet for Tempest's magic, relieving her of the painful and random outbursts. When worn, the stabilizer allows her to perform base-level spells such as levitation and minor object manipulation.