"I want you to get it through your head: You can't proctect me from this guy, you can't stop him." He sighed. "Anywawy, it turns out they offered me a ride here because they were goin' to assault a ship on the docks for some reason. Anyway, we got here, and, like I said, we were on our way to a hotel, when we saw three guys, and all of a sudden this vampire, or this guy swoops down on the third guy, and basically sucks his blood, just like that, no reason. The other two guys basically tried to attack him, and suddenly his buddies appear, meanwhile we ram on the breaks, run a guy over, and we all take out our guns. They were too fast for us, the others just ran out of ammo, I didn't fire a shot, I was almost paralyzed, and busy keeping my head down. Suddenly one of the......vampires I guess, grabs me throws me onto the road. I scrambled, picked up my gun and suddenly something yanked the gun out of my hand, and with one shot each, drops the vampires. Every. Single. One. Then he glared at us, almost as if chatising us, then like that" He snapped his fingers. "He's gone. The guys left quickly, leaving me to limp to the hospital."
Vader's wife was very pregnant when she died 19 years ago. All of a sudden a 19 year old who is very strong in the force and has a distinct resembalance to him in his younger days rolls in from Vader's home planet with his old Master Obi-Wan (Who was the ONLY other person preset at the time his wife died. And to boot, the kid's last name is Skywalker.
So in answer to your question, he knew Luke was his son because his name is Darth Vader, and not Darth Retard.
-Forum post on why Vader knew Luke was his son.