I know someone who does polygraph testing for the government and though he said it's pretty accurate, he's had it show someone was lying when he knew that he was telling the absolute truth. For whatever reason it was only inaccurate on that one question, but it kept showing false on that question and that question only.
The other problem with them is that it can be skewed by the perception of the person being tested. If someone in his own mind did not consider what he did to be murder, etc, then if you ask that person if they murdered person x, he will say no and be shown truthful. Heck, you'd have to be pretty messed up, but if you believed you weren't in your right mind when you did something you could say that "you" didn't do it and possibly pass.
Again, they work most of the time, but they aren't perfect.
What is funny is that things like bite forensics that are far, far less reliable than polygraphs have been allowed in courts. Even fingerprint matching has been shown to be wrong in some pretty high-profile cases because of the variance in the number of points of identity required for a match and the fact that it is people and not computers that declare matches conclusive in the end.