Because Amero's attorney failed to raise the issue of malware, most of a defense expert witness's testimony was excluded from presentation to the jury, which unanimously voted for conviction.
There are so many things wrong here:
* The school district had let its filtering software expire, so the machine didn't have adequate protection (and was likely unpatched for major vulnerabilities).
* The police did an incompetent investigation, failing to check for malware.
* The police testified, falsely, that Amero would have had to physically click on a pornographic link to get those sites to pop up.
* Amero's attorney did an incompetent job of defending her, by failing to bring up the critically important issue of malware.
* And the law itself is absurd--Amero shouldn't get 40 years in prison even if she had intentionally shown pornography to seventh graders.
Lindsay Beyerstein has a good summary of the case at the Huffington Post, including links to the expert testimony that shows conclusively that malware, not Amero, was at fault. P.Z. Myers criticizes the "insane anti-porn hysteria" aspect of the case at Pharyngula.
UPDATE (June 7, 2007): Julie Amero has been granted a retrial! She will get a new trial sometime in 2007.
UPDATE (November 26, 2008): The state of Connecticut has finally decided to drop the charges against Amero.
UPDATE (December 4, 2008): But Amero still loses her teacher's license!