Harry Potter appeals to the majority of most demographics. Thus, I think its success lies in its accessibility - which is 'supplemented' by good/competent writing. Even though it seems to target a young audience, an adult/adolescent can also appreciate the story for what it is. This is because, interestingly, as the series progresses each book becomes gradually 'darker' and more mature. The light-hearted wonderment in the first book, while it isn't completely gone, lessens by each installment in lieu of this. This gradual shift in tone is reflected on Harry and his friends - who likewise become more developed/nuanced as they too 'grow up'. I think that this contributed greatly to maintaining and growing the fan base, since the people that have grown up with the series remain engaged by the similar development of Harry Potter's characters and it's tone+themes.