Nightmare Moon

Nightmare Moon is the evil verison of Princess Luna.

History
Long ago, Luna and Celestia were both the rulers of Equestria, a land inhabited by ponies. Every morning, Celestia would raise the sun, and every evening, Luna would raise the moon. Together, they kept the balance perfectly. One day, however, Luna grew jealous: the ponies would be awake to enjoy the day and love, admire, and appreciate Celestia's work, but would always sleep through her far more beautiful night. One day, Luna turned on Celestia, saying she should be the only princess in Equestria, and raised the moon before the bitterness in her heart manifested and transformed her into Nightmare Moon. Celestia did not want to fight Nightmare Moon and told her to lower the moon, but Nightmare Moon said her only royal duty was to destroy Celestia, and shot at her with magic beams, eventually knocking her down. Seeing no other way, Celestia reluctantly used the Elements of Harmony to overpower Nightmare Moon and banish her to the moon, creating the phenomenon known as "the Mare in the Moon" (a unicorn's face imprinted upon the surface of the moon). It is said that in a thousand years, on the longest day of that year, Nightmare Moon will make her return.

Return and redemption
Upon reading an ancient legend, Twilight Sparkle realized Nightmare Moon is about to return, however her mentor, Princess Celestia, encouraged her to make friends instead of worrying about the supposed "old pony's tale". Unfortunately, Twilight turned out to be right and Nightmare Moon was released during the Summer Sun Celebration, replacing Celestia who was supposed to attend it. Twilight and her soon-to-be friends chased Nightmare Moon into the forbidden Everfree Forest.

After conquering many obstacles left by Nightmare Moon in their path, they finally found the twisted mare herself along with the ancient Elements of Harmony, now reduced to inert stones. As Nightmare Moon whisked the Elements away, Twilight followed her into the portal and confronted her alone. She tried to use the Elements of Harmony like Celestia did, but for that she had to find the "spark" that would make a sixth Element appear. However, no matter how hard she tried, she couldn't make the spark, and Nightmare Moon destroyed the Elements.

Fortunately, when Twilight heard her new pony friends calling for her, she felt a different spark in her heart; making her realize that the real Elements are not just some stones: they exist in the hearts of her friends. That spark triggered the final element: Magic (also known, of course, as Friendship), and reanimated the shattered Elements, converting them into jewels for the six friends to bear. Using the Elements of Harmony, Twilight activated a spell that struck Nightmare Moon, exercising the darkness from her and transforming her back into Princess Luna.

Celestia arrived in the ruins where the battle took place, admitting that she knew of Nightmare Moon's return, but knew the only way to defeat her was for Twilight to understand the importance of friendship. Celestia walked over to a cowering Luna, who apologized in tears for her actions, and was granted forgiveness. Later at the celebration (held by Pinkie Pie), even the other ponies forgave Luna, gifting her with a flower necklace.

Rivalry with Queen Chrysalis
In Thomas, Twilight Sparkle and The Chronicles of Narnia: Prince Caspian, Queen Chrysalis made a deal with Nightmare Moon not to kill Cadance. in Brian Griffin's Adventures of Transformers: Age of Extinction and Brian Griffin vs. The Mummy: Tomb of the Dragon Emperor, things were working well. Then in The rise of the Changeling King II, a Changeling told Chrysalis tat Nightmare has destroyed all of the radios, and killed several of the Chaneglings, Chrysalis knew she double crossed her. So, Plankton and Captain Thorn told her they'll go after her. Nightmare Moon however, with her husband, Ceberus and her daughter reach the center of the temple and reveal the Changeling diamond! And she reveals that she's gonna use the diamond to make the night last forever. She then kills Plankton and Captain Thorn and many of the Chaneglings, in a room. Then she ends up getting a sword duel with Chrysalis and she is later killed by Diesel 10. While King Sombra, Nightmare Trix and Ceberues try to escape they end up getting killed by flesh eating scarabs.

Then, in Thomas' Amazing Adventure: The Search for Pufferrod the original Train-Prime

Trivia

 * Nightmare Moon is also Princess Luna's clone.
 * She is also partners with The Nightmare Train.
 * Nightmare Moon had appeared in Thomas and Twilight Sparkle's Adventures of Sailor Moon S: The Movie, Thomas and Twilight Sparkle's Adventures of Jumanji, Brian Griffin's Adventures of Transformers: Age of Extinction and Brian Griffin vs. The Mummy: Tomb of the Dragon Emperor.
 * Nightmare Moon is also King Sombra's married wife.