How Smelly Panties got involved with a murder is beyond me
I got to the bottom of the murder without Smelly panties" I just took a screenshot because it was funny and I know people who will also find it funny.
There are multiple ways to advance the murder investigation. One of the routes is for players who have the "Pet Pal" talent (which allows them to talk to animals). Jake (the murder victim) has a dog, and the dog knows what his master smells like. Because of this, you can bring the dog articles of clothing from the various suspects and he'll tell you which garment "smells like Jake" (in other words, which one belongs to someone who recently handled/stole Jake's body).
In the case of the smelly panties, the dog makes a point of noting that the garment smells like every man in Cyseal except for Jake. This is important, because while it makes it crystal clear why the town has a certain opinion about Esmerelda, she clearly did not steal Jake's body.
There are, of course, other ways to get this information - this just happens to be one route available for people with the Pet Pal talent. You don't even need the panties to clear Esmerelda's name through the dog.. there's another "smelly" item you can pickpocket from her, but that obviously requires the pickpocket skill. The panties just happen to be the easier-to-obtain garment (assuming you're willing to snoop around in Esmerelda's bedroom).