Secrets are at the heart of many plots. In fact, if you study nearly any romantic comedy, you’ll fine that all the comic situations are built on secrets or lies, usually both.
I have long believed that a good writer will allow his characters to keep secrets, and the secrets must be revealed before the end. But the question is when and why to reveal them.
Something that I learned in a screenwriting class is, the best way to disclose a secret is when disclosing is the lesser of two evils. That is: if a character reveals a secret, s/he will lose respect or love or something worse. But, if s/he doesn’t reveal the secret, then something far more devastating will happen.
So characters reveal secrets only when forced, to prevent something horrible from happening. A writer will do this to heighten the drama.
Also, by having secrets, the reader knows that the truth will eventually be found out. So by introducing these secrets early on, it keeps the reader in suspense of when the truth will be revealed, and what the fallout will be when that eventually happens.
Once a character withholds information, then the plot should twist the story so that the longer the character holds his/her secret, the more devastating the results will be when the information is finally exposed. It’s like a harmless little white lie that begins to build on itself, taking on bigger meaning and more damaging consequences until it will have a huge dramatic effect over everyone’s lives.
Like any literary device, characters keeping secrets is a powerful tool in the writer’s hands.