Luke had a wife – call her Mara Jade to continue with that tradition. Mara was pregnant but either did not know yet or had not told Luke yet when Ben turned into Ren.
During that event Luke lost his mind – pain, fear, suffering, etc. and turned to the dark side. He rages against Ren and his followers and sends them fleeing to the First Order, causing a lot of collateral damage in the process. In fear for her life and that of her unborn child, Mara flees to Jakku, where she has an ally in Lor San Tekka. She gives birth to Rey in secret, as she’s unsure of where Luke (or Leia or Han’s) heads are at.
Luke eventually comes back to the light side, but knowing his inner turmoil and emotional state represent a dark side threat to everyone, he goes into self-imposed exile. He leaves a map, hoping that the only people that can help him (Mara, Han, Leia) will eventually forgive him for what he perceives as his fault and come find him.
Mara, now knowing Luke has exiled himself and sensing the threat growing in Ren and the First Order, knows she has to find Luke and bring him back as a matter of priority. Mara and Lor San Tekka raise Rey (Lor San as “grandpa” or perhaps just a father figure) until she’s self-sufficient enough that they can leave her to go on their search. Much like a young bird who knows how to fly without understanding physics nor aerodynamics, Rey’s innate Force abilities allow her to channel it when needed the most. Perhaps Mara trained her some as well, but never told her of the Jedi or the real history of it. She begins to recognize and explore her abilities in The Force Awakens.
They eventually find the piece of the map, with Mara losing her life in the process. Lor San Tekka returns to Jakku to keep a watchful but distant eye over Rey. He does not want to disrupt her by coming backing into her life and telling her that her mother is dead, and that he is not related to her by blood. He knows eventually she will discover her relation to Luke, especially if he’s been located and is brought back into the fold. He’ll come looking for Mara and likely find Rey. So, he reaches out to Leia, telling her that he has an important clue to Luke’s whereabouts, bringing Ren’s attention to Jakku where all the backstories collide.
He may or may not have told Leia that Rey is her niece. If Leia knows, she’s not ready to reveal it to Rey upon meeting her.
Much like R2D2 understood the full backstory in the prequels but did not tell anyone, Chewie assumes everyone knows Rey is Luke’s offspring because to his Wookie nose, she clearly smells like a Skywalker. However, he assumes this is obvious to everyone and does not say a word.