Since we don't know anything about Flame Princess I have made a theory of what could have happened in her past.
Several years ago Flame King wasn't the king of the Fire Kingdom yet (at that time I named him Vulan). He lived along with his wife Azarin and his daughter in the palace of his brother, King Kalama. After some time Vulan discovered that his wife was having an affair with his brother. After finding out about this he killed both his wife and his brother, what he didn't know was that Flame Princess was watching. This caused Flame Princess to be traumatized resulting in her sudden mood swings. Vulan became the Flame King. But Flame King noticed that he couldn't control his daughter, and that his kingdmo might be in danger. He asked for the help of Princess Bubblegum who designed a candle cage to lock FP in.
And of course I didn't forget to think up Flame Princess's name; Celosia. The name is based on a flower. The name Celosia means burned and refers to flame-like flower heads, thought that was fitting for her. I also made a synopsis for an episode only focussing on Celosia where she turned 15 and had to find her inner flame on the bottom of the highest volcano in the Fire Kingdom. She had to fight her way through to get to the bottom and there she meets the Blue Flame God and the spirit of her mother (also in blue flames) who grant her the power to use blue fire. This episode would reveal more about her past.