When Luke arrives on Dagobah, he says it feels familiar:
LUKE: Still, there's something familiar about this place, like something out of a dream
Why does it seem familiar if he's never been there?
Science Fiction & Fantasy Stack Exchange is a question and answer site for science fiction and fantasy enthusiasts. It only takes a minute to sign up.Sign up to join this community
LUKE: Still, there's something familiar about this place, like something out of a dream, or...maybe I'm just going crazy.
Luke has some training in the Force and a lot of untapped potential through his family's strong connection to the Force. Luke was likely sensing something familiar, in a dream-like way, because Dagobah is teeming with life and, like Yoda, has a strong Force energy. It has a connection to the Light and even the Dark Sides of the Force.
This is reinforced later when we see a similar situation when Luke and Yoda are near the cave:
LUKE: There's something not right here. I feel cold... death.
YODA: That place is strong with the dark side of the Force. A domain of evil it is.
This is a possibility. All contained in the script of The Empire Strikes Back
LUKE Still... there's something familiar about this place. I feel like... I don't know...
YODA Feel like what?
LUKE Like we're being watched!
So the familiar feeling could be that he was being watched, or even Yoda's presence. Which sounds strange until.
YODA This one a long time have I watched. All his life has he looked away...
So we know that Yoda used force vision to keep tabs on things. Luke is force sensitive so may have felt this presence, when Yoda is actually next to him watching it would have felt familiar.
YODA: "Strong this planet is with the Force. It is one of the purest places in the galaxy."
Luke feels things. And Yoda was an important element in his father life. So, by coming closer to this Jedi Master, he's coming closer to his father.
Moreover, don't forget about the Force, and about midi-chlorians. According to this site, the Force spoke through the midi-chlorians. We know that the hightest midi-chlorian rate belong to Anakin, and the second to Master Yoda. So, with some genetic magic, Luke has to be very sensible about the Force.
About Dagobah itself, we know that : Hundreds of years before the Clone Wars, the Jedi Minch battled and killed a powerful Bpfasshi Dark Jedi on the planet. The Dark Jedi's energies absorbed into its surroundings, tainting the cave where he was slain with the dark side. The cave where Luke trained himself.
During his first visit to Dagobah, Yoda entered the tainted cave and experienced a powerful vision showing him the extent of the Sith's tightening hold on the galaxy, the impending destruction of the Jedi Order, and the confirmed existence of Darth Sidious.
Watching the scene, he doesn't seem to be speaking like he's sure. He seems to be thinking out loud. He's throwing out guesses as to why he might be feeling what he is feeling. Since no connection between him and Degobah is revealed, I took it to mean he had guessed incorrectly. He is not familiar with the particular place of Yoda's swamp, at least not in any normal way. Any connection he has to the place is through the force.
In a book released in 2009 by Lucasfilm Ltd. and Scholastic Inc., written by Ryder Windham, before Disney bought Star Wars and turned most Canon into Legends, you learn that, as a child on Tatooine, he can always feel when Ben is watching him, but every time he looks, Ben is gone. One day, he even asks his aunt Beru about it and here's an interesting section:
"Is someone seeing me, Aunt Beru?" Luke asked.
Beru Lars was standing in her kitchen, making biscuits. She glanced at the four-year-old boy, her husband's stepbrother's son, who sat on the hard white steps that led up to the dining alcove, and said, "Your aunt Dama will be seeing all of us. She should be here any time now."
Luke frowned. "No. I don't mean Aunt Dama. I mean, is someone watching me?"
Beru smiled. "You're right here with me, so I'm watching you."
The boy shook his head. "No. Not you or Uncle Owen. I mean someone else. Someone I can't see."
Beru almost dropped the spoon she had just picked up. She set the spoon down beside a bowl with a gray mixture in it and tried to keep her voice calm as she asked, "What makes you say that, Luke?"
Luke was holding a small toy landspeeder. As he turned the toy over in his hands, he said, "I just felt like someone else was close by. I thought maybe there was somebody behind me, but when I looked up the steps..." He turned his head to look back toward the dining alcove, then returned his gaze to his aunt. "No one's there."
Beru sighed. "Living far from other folks like we do, it's not unusual to get a bit jumpy. You feel a small shift in the air, or hear a slight noise, and your imagination starts playing tricks on you."
"Really?" Luke said. "But I didn't hear the wind or anything this time."
Beru gripped the edge of the kitchen counter to steady herself. She said, "There's been other times you thought someone else was watching?"
"Sometimes when I play outside," Luke said. "And every time we go into Anchorhead."
Beru stepped away from the counter to kneel down beside Luke. Gripping his upper arms gently, she said, "Luke, this is important. You've never, ever actually seen any man watching you, have you?"
Luke cocked his head sideways as he held his aunt's gaze. "You think it's a man?"
Beru shook her head. "No, sorry, I didn't mean to say that. I meant anyone, any person. You've never noticed anyone?"
Luke shook his head. "No, ma'am."
The first two pages of chapter 1 pretty much explain why he feels familiar, like something out of a dream. Because he knew what it felt like to be watched as a child, so not feeling that way for so long made it so that when he did feel like he was being watched again, it was like reliving a childhood dream that his aunt and uncle repressed as just "a feeling".
I know that this answer doesn't give a real explanation, but I always believed that it was a note of background that Lucas attempted to give to the original trilogy. I believe that he imagined Luke to be taken there as an infant (eg. to be saved from his father). I think I have heard this theory by other fans, before Ep. 3 was released. However even if Lucas intended Dagobah to have been visited by Luke before his conscious memories, that was not the case in Ep. 3.
It's strange that (as far as I now) no SW author attempted to flesh out Luke's statement in order to explain it.