Princess Luna originally broke out of the shell of Nightmare Moon. (Video coming soon)

When Luna got so jealous that the ponies in the day of the sun were romping and playing and they shunned and slept in her night Princess Luna vowed to turn the whole day dark and therefore got banished to the moon.

As the 1,000th day of the Summer Sun passed, the stars helped Nightmare Moon escape from the moon. Then she eternally made the world of Equestria dark, night of night.

When Twilight and her friends defeated her, she broke out of a periwinkle blue shell and took on her true form, Princess Luna.