Han Solo explains it to Rey:
Luke basically pulled an Obi-Wan and trained Vader Jr. Almost literally.
And then he pulled a Amazing Disappearing Yoda trick.
Luke learned well from his past Masters :)
Why'd he leave?
He was training a new generation of Jedi. One boy, an apprentice turned against him, destroyed it all. Luke felt responsible... He walked away from everything
Alan Dean Foster's novelization:
Rey spoke while drinking in the details of the marvelous but imperfect chart. “Why’d he leave, anyway?”
Han pursed his lips; thinking back, remembering.
“He was training a new generation of Jedi. There was no one else left to do it, so he took the burden on himself. Everything was going good, until one boy, an apprentice, turned against him and destroyed it all. Everything Luke had worked toward: gone. Luke felt responsible. He walked away from everything.”
Finn’s tone was respectful. “Do you know what happened to him? Does anyone?”
Han turned to him. “There’ve been all kinds of rumors and stories. When people don’t have access to facts, they invent what they’d like to believe, or what they think others would like to hear. The people who knew him the best think he went on a personal quest, looking for the first Jedi temple.”
Out of universe
First of all, @RickSanchez's answer is totally awsome and probably better at addressing OOU than what I found.
But I found a slightly different, complementary reasoning to the one he cited. During Guild Screenings Q&A with the screenwriters, J.J. Abrams said about his reason to agree to work on the reboot, that it was an exciting idea to explore in terms of...:
“Luke Skywalker is potentially an unknown. Luke Skywalker is potentially a myth. Luke Skywalker, is like, you know, King Arthur. To someone who’s 19 years old, what does that mean?”
Admittely, most of the famous Arthuriana deals with actually-active King Arthur, not a shut-off in exile King Arthur, but we'll forgive that inaccuracy because NO MIDICHLORIANS!