WMG / Hard Candy

Hayley was previously in a psychiatric hospital.
She said "four out of five doctors agree I am, in fact, insane." This was played to be a joke, but she was serious. she was evaluated by five doctors. Four said she was dangerously insane, the fifth, though, managed to sweet-talk a judge into releasing her.
  • The fifth one tried to exact sexual favors from her in exchange for a favorable judgment. A coupla days afterwards, he wound up dead, Driven to Suicide .
Hayley is actually a relative of Dexter Morgan's.
Her past and even her real identity are left ambiguous in the film. "Hayley" may either be Dexter's stepdaughter Astor or his now grown-up daughter Lily Anne from the novels. Or some other kid entirely that he had with another woman. Like her father, she is a killer who abides by a code—probably instilled in her by Dexter himself—where she targets certain people (in her case, pedophiles/hebephiles, rapists and murderers) and follows a ritual when killing them so that she won't be incriminated (which for her would be mind-raping her victims until they are Driven to Suicide).
Hayley isn't a real person, but is rather an avenging spirit/angel/supernatural being, acting as a patron saint of molested children who punishes pedophiles.
It makes a lot of sense. Hayley has an unnatural amount of knowledge and skill for her age, and seems to have the maturity to deal with any situation- not something a teenager would have. She seems to have an almost omnipotent knowledge of what Jeff's neighbors are doing. She admits that she has already hunted down one pedophile, and it is implied that she has hunted down more. At the end of the film, it is revealed that nothing we know about her is true, not even her name, which begs the question...who is she? The idea that a child with a home and parents could pull something like this off is ridiculous. However, if she is more of a manifestation of vengeance itself, it makes sense that she just makes up whatever identity is convenient and has no home/life. There is also her line at the end of the film, when asked who she is Hayley responds "I am every little girl that you ever watched, touched, hurt, screwed, killed.", which could be taken literally. And lastly, the lyrics of the song at the end of the film consist of somebody begging an angel to be merciful - the protagonist of the song could be Jeff and the angel in question could be Hayley.
Alternatively, Hayley is a malevolent spirit/demon/Fallen Angel/incomprehensible horror, masquerading as a little girl, whose latest prey happens to be a Child Rapist.
Though the Idea of Hayley being an supernatural being would explain why a girl her age could get around the film's setting, and the inhuman level intellect needed to concoct and execute her plans, attributing to her as an “avenging angel” or "Patron Saint of Molested Children" more or less diminishes the “Evil vs. Evil” aspect of the film as Hayley was never good to begin with. To balance this out, Hayley could just as well be a malign force in a similar vein as Mephistopheles or Nyarlathotep, who transitions into many forms, including the people Jeff victimized (This would be a literal interpretation Haley's Breaking speech as quoted from the previous entry), deliberately honey potting Jeff into giving into to his lurid desires and condemning himself, all the while feeding off of his anguish and despair during the moments she tortures him. The interpretation of the End Theme Lyrics, comparing Hayley to the angel, and Jeff to the protagonist, the Angel in being could very well be Satan or any other fallen angel, while said protagonist is now a plaything to said beings malign whims.