My initial hypothesis (posted above) was that Rey is Han and Leia's daughter (Ben Solo/Kylo Ren's sister), but I'm shifting that to her being Luke's daughter. I'm thinking that she was hidden or abandoned there when Ben Solo started fucking shit up for Luke's new Jedi academy.
I'm also tipping that she, not Anakin Skywalker, is the chosen one according to the prophecy of the person who brings balance to the force. There's a few reasons for this: firstly, Anakin totally shredded any hope of bringing balance once he became Darth Vader and helped Palpatine exterminate the Jedi, so it wasn't him. Secondly, there's a line by Maz Kanata in the cellar after Rey's force vision explaining that the force unites good and evil, so it's both, not just the light or the dark side. Thirdly, and this is one that takes a lot of thinking about back story that you don't get in the films: the force drives all of the events in the galaxy like some giant puppet master, which explains why Qui-Gon and Obi-Wan were sent to Naboo, why their ship just happened to cop a hit in the hyperdrive during their departure back to Coruscant, why they just happened to land on Tatooine and find the boy Anakin, why R2-D2 and C-3PO ended up in the possession of Luke on Tatooine, why he and Kenobi met Solo, why Solo met Leia and had at least one child. The force caused this all to happen. All the way up to why Lor San Tekka was hiding on Jakku with the secret of Luke's location (and quite possibly keeping an eye on Rey the same way Old Ben did for Luke on Tatooine), why BB-8 ended up in the possession of Rey, why the Millenium Falcon just happened to be parked on the edge of the village she lived near…
It's all the work of the force, and it's just playing the long game with this whole prophecy thing; first it needed to almost completely destroy the grip the Jedi had on the force to allow the Sith to expose themselves and be beaten. Next is the transition phase presided over by Luke Skywalker, which ended when Rey finally met Skywalker on that island in the ocean (the same island that Kylo Ren found in Rey's thoughts when he tried to read her mind). But before this could happen, the force had to test Luke by creating Kylo Ren, when he is defeated (I would say turned back to the light by Rey and Luke and Leia), only then will Luke and Rey be strong enough to complete her training for her to beat Snoke. Luke also just didn't 'run away'. He went there to train more, confer with his own masters Yoda and Ben and his father, and keep an eye on proceedings like Yoda did himself.
And to wrap up my hypothesis, just look at how powerful Rey is with zero training. She got more powerful by the minute during her time in the hands of the First Order. Far more powerful than both Anakin or Luke. She defeated an apprentice of the dark arts in a light saber battle just by focusing for a bit and letting the force flow through her. What she will do in time (or by the end of Episode IX) is unite the light and the dark into one discipline and finally bring true balance to the force.