NOTE: I started writing this about fifteen minutes ago, so sorry if I contest any recent replies.
Very interesting discussion.
All the previous replies have good ideas, but I have my own personal two theories:
1. Equestria was first created not as a planet, but as a huge chunk of rock floating through space. This became a problem when the organisms living on the asteroid began evolving into sentience. Equestria only slowly orbited the sun, requiring the ponies to "wrap up" the seasons. It did not rotate, requiring Celestia to latch onto the sun with her magic and spin the planet accordingly. It eventually caught another asteroid in it's gravitational pull, adopting it as its "moon." The rock was too far away to orbit properly, so Luna (who was born later) needed to guide it's rotation around the planet.
2. Equestria was once named Earth, and populated by humans. The human race eventually doomed their own species and planet in a huge nuclear war, somehow scarring it so badly it halted its rotation and orbit, and effecting the moon as well. But soon a new species rose out of the dirt, evolved from horses and adapted to human lifestyle. The leftover radiation from the colossal nuclear war would explain the horrifying mutants that devour rocks and minerals, the use of "magic," and the grotesque hybrids of completely different species. The ponies' habitation of Earth would explain their obsession with human culture: Their sayings, their houses, and completely illogical teacup design.
UPDATE: Regarding recent evidence, I am also beginning to speculate that ponies are actually aliens, either to Equestria or Earth.
For those contesting the "Planet of the Ponies" theory for EG reasons, I believe the portal was not to the human world, nor the pony one, but a crude crossover of both. I mean, seriously: In our world, there are no weird technicolor pony-people, there's no one named Sunset Shimmer or Rainbow Dash, and don't you think the bronies would have noticed if the humanizations of their favorite TV show characters were walking among us? Also, the news would have noticed an inter-dimentional portal and a high school being destroyed by demons.
Case closed.
(P.S. I also have a theory that it's just a kid's show about magical talking horses, and it doesn't need any logic to be enjoyable. But I know it would be suicide to state this among True Bronies.)