The phrase often implies a strong negative judgment and can suggest someone is untrustworthy or dishonorable. She cheated in the exam, now her name is mud in this school.
Pro Tip 2/3
Not Literal
This is a figurative expression. It doesn't mean the person's name is literally written in mud. He lied to his friend and his name was mud, though not in the garden but in the gossip circles.
Pro Tip 3/3
Informal Usage
It is used in casual conversation and is not suitable for formal contexts, like business or academic writing. Since the scandal, his name is mud in our neighborhood, but you wouldn't read about it in the newspaper.