I am a freelance author consultant and have ran into a unique problem. My customer happens to share a similar name with a famous author and she is concerned that there might be potential problems if she publishes under her own name. I would like to know if there is any possibility that she could find herself in legal trouble for using her own name.
As for legal trouble, you should ask the lawyers about that, not the writers. But I doubt she'd get into trouble, per se, since it is, after all, her own name. Though it's possible there is some rule about not using the same author name as another author (I know there can be with actors) and publishers might insist she get a pen name.
That said, even if it is allowed, I would strongly STRONGLY recommend she NOT use her own name if there is an existing author by that name who is well known. Everyone will get her "brand" mixed up with this other author's, making it hard for her to build her own. She's going to want her own unique platform with her own following; the last thing her image, marketing, and titles need is to be constantly confused with someone else's. Tell her to brainstorm a nice pen name (maybe help her do it, or find someone who is knowledgeable about such things to help with it!) It can be similar to her real name, if she wants, but it needs to be different enough it isn't going to get confused for someone else.
Basically, this is probably less an issue of "would I get in trouble?" and more one of "how do I keep my brand separate from this other person's?"
As @MarielS, it's not a legal issue, but a customer confusion issue. People will confuse her brand for the famous author's brand constantly - in search results, in bookstores, on covers, etc. They may pick up one of her books expecting it to be the work of that other author, only to be disappointed when they realize it's not who they were expecting.
Imagine if my name was Stephen King. Obviously, if I were to publish a book with my name on the front cover, people would think, "Oh, wow, Stephen King must have a new book out!" But then they discover that I'm actually a small-time science fiction writer, not a horror writer, and they will probably put my book down and feel pretty darn cheated. So I would probably either publish under a shortened name (Stephen K. or S. King, perhaps) or just change it altogether and use a pen name.