Knock Knock was born in 2263. Long ago, an earlier generation of kids got a book from Vault 87 called Vault-Boy's Big Book of Laughs for Kids. Even though the book has long since been destroyed, many of the jokes were passed down through the generations, and the knock-knock joke has been her favorite sort of humor, even if it's not always understood.
She is the twin sister of Knick Knack and changed her name from Sue to Knock Knock, because "Knock Knock and Knick Knack sounded better than Knick Knack and Sue". Her role in the community is to be in charge of "morale", a job description that includes telling jokes and keeping the peace as an officer of the law.
If you ask her for a joke and laugh at it or pretend you found it funny, she will ask the Lone Wanderer for tales from the Wasteland.
Basically, there are three parts of "your story" you can tell her depending on progress in the main story. No matter where the Lone Wanderer is in the main quest, she can be told the first stage, about exiting the vault. After completing The Waters of Life, the Lone Wanderer relays James's sacrifice. The final part of the story details the escape from the Enclave in The American Dream.
No matter your Karma, you can tell her 3 versions of your story: good, neutral and evil. One option, remarking that the wasteland is littered with the victims of your revenge and "amusement", will cause her to become nervous. She asks (indirectly) for confirmation that you find her amusing and will not harm her. Whatever you tell her she will proceed to tell to every other Lamplighter she comes across.
Silver-Tongued Devil: If you follow the conversation that starts with how she's in charge on morale, she tells you a joke. You can lie to her and tell her how great you think the joke was, which is a speech challenge, and can be repeated infinitely to count toward the Silver-Tongued Devil achievement.