Setting up surprises for players adds a sense of discovery to a game. Keeping things secret from all the players until they discover them is a fundamental aspect of unravelling the adventure set before the players. But keeping things secret from some of the players because in character some of them would know the information while others wouldn't is a different kettle of fish.
Normally, PCs will tend to share all of the information they know, because they are usually working together. It helps if you encourage the players to have some little personal secrets in their backgrounds - things which they alone know and would not like to share with their fellows. Get them into the habit of not automatically spilling the beans on everything they learn.
This can cause things to go horribly wrong when some of the PCs do something they wouldn't have done if they knew everything their compatriots knew. But then, that's half the fun!
Transcript
Luke: So who knew that Vader was my father?
{beat}
Luke: Okay, so who didn't know?
Yoda: Well we all figured Vader was Anakin, but we didn't know for sure. Except maybe Annie.
Luke: And you all kept it secret from me? And week after week we sat here around this table and you just kept it all to yourselves?
{beat}
Luke: That is so cool!
GM: Glad you liked it. I set up a few things before you joined the game. There are a few surprises left!
Yoda: Really? Oh.
GM: Really, yah.
Luke: Awesome.
R2-D2: Yes, the future is crowded with secrets.
Luke: Oh, like you've got secrets.
R2-D2: I could tell you about the Rusty Aargonarian Maid...