Take this theory with a grain of salt, as I've only read two of the Harry Potter books (Sorcerer's Stone and Chamber of Secrets), but I've got a theory as to why they're so hugely popular with readers of all ages. It's not J.K. Rowling's writing skill, as excellent as it may be, or the adventures Harry encounters, or the spells and supernatural creatures we meet. It's something much more mundane - the way that most of the children and young adult characters are like people most of us really know.
Consider some of the major ones: the loyal buddy who'll stick with us through anything (Ron); the smart, teacher's pet-ish girl who just barely manages to avoid being an obnoxious know-it-all (Hermione); the spoiled brat (Dudley); the superjock, who lives and breathes sports (Oliver, the let's-practice-at-dawn Quidditch captain); the kid who gets a bit of authority and becomes slightly drunk with power (Percy the prefect); and the archenemy who just hates our guts (Draco). And let's not forget Harry himself, a super-capable achiever who's bewildered by his abilities.
I've been out of school for years yet can picture kids who fit squarely into most of those categories. I'm certainly not alone. And that, in my opinion, is the secret to Harry Potter's huge popularity.