"Future, past, old friends long gone"
"I saw a city in the clouds"
Luke tapped into his force premonitions by using his fear, he took his weapons because he was afraid something would happen. And Vader showed up because he took his weapons, his dark side opened up a peep and he saw what would happen, just like when he saw Han and Leia in pain. He saw more clearly with concentration, even if it wasn't full concentration, he saw what would happen. The cave was his fears appearing, but also force premonitions coming out subconsiously. He knew Vader was bad, he feared to become that way, but fearing is the start, which is why his face was in the mask, his bad vibes made him see what he would become of he didn't learn control. On the other hand (no pun intended) he subconsiously knew Vader was his father, searching his feelings (fear, etc.)