But, OK, people get nailed based on flimsy evidence in our world, too. But then, there's Harry's godfather, Sirius Black, long considered one of wizardry's most notorious mass-murderers. In reality, Peter Pettigrew (the evil weirdo who pretended to be Ron's pet rat and who presumably saw Ron masturbate countless times) committed the crime Sirius was blamed for. But, it was far from an ingenious frame job, especially considering some of the tools available to the prosecutors.
First, there's the Priori Incantato spell, which is essentially like accessing your browser history -- it shows you the last spell a particular wand was used to cast. At one point, it gets used on Harry's wand and proves that the wand was used to cast an evil spell. But, even that wasn't considered sufficient evidence that he did it. However, the magic police don't even bother using this on Sirius -- the fact that he was present at the scene of the crime was all the evidence they needed to ship him off to prison indefinitely, because, apparently, civil liberties are right up there with human fashion on the list of things wizards don't understand.
Another Black defendant screwed by the system.
Then there's Legilimency, which lets the caster peer into the target's deepest, darkest secrets, and Veritaserum, otherwise known as goddamn truth serum. Either one would've let them know whether Sirius was a murderer or, hell, whether he had ever stolen any coloring books. But, they use precisely neither of those things, for reasons that are never explained. They're apparently not forbidden by their constitution (if they have one, it's probably a sentient, unreadable scroll that flies around the room like a bat), but, even if their use requires consent of the accused, you would think Sirius would have agreed, rather than get shipped off to be tortured by soul-sucking ghouls the rest of his life (yeah, more on that in a moment).
"Ahem ... are you sure we can't change your mind, Sirius?"
"Nah, I don't want to be a bother."
And what about when Hagrid was shipped off to prison for the crime of "kids are being attacked in a way that's similar to attacks you were insubstantially linked to decades ago" (as happened in Harry Potter And The Chamber of Secrets)? There was no trial; the Minister For Magic just showed up at his house and said, "Pack your giant bags; you're going to Wizard Superjail." No real investigation was ever conducted, presumably because wizard justice operates on the important principle of getting all their business done in time for happy hour.
Although, it's hard to blame them when their workplace looks like a set out of Brazil.