According to an old prophecy, an evil pony wanted to make night last all the time to have all the ponies appreciate the night. She was sealed away within the moon but would return during 'the longest day of the year'. Twilight Sparkle is trying to find out about and preventing the prophecy, but is instead tasked by Princess Celestia with going to Ponyville and make some friends.
"Get your muzzle out of those books and make some friends!" That's what Princess Celestia tells Twilight Sparkle. She may be the smartest unicorn in Equestria, but Twilight Sparkle gets an "incomplete" in friendship. There's more to life than learning magic, after all - so she goes to Ponyville on a mission to make friends. There she meets five special ponies who take her on exciting adventures and teach her the most powerful magic of all... the magic of friendship!