Luke was a pilot too, although we didn't see too much of it before the X-wing battle. He fley the thing he had a toy of (You can see the full size thing in the movie actually, next to the Lar's garage, although otherwise it doesn't appear until ROTJ's special edition) and he felt confident enough to submit an application to the Imperial academy.
His dialogue with Biggs also suggests he's a pretty skilled pilot, and other stuff has him be pretty good at shooting from ships too-the "here they come" scene and of course his "Womprat" boast.
He does seem a bit out of his depth on the Millennium Falcon at times but that's a considerably more complex ship than the one-man stuff he usually flies.
Rey also has lived her life among the wreckage of space debris so it's possibly she studied those ships as well. I think that's kind of why she found her way so easily around Starkiller and what was left of DSII-she's used to climbing around those kind of stuff.