The Heroes of Olympus by Rick Riordan
Young Wizard series by Diane Duane
Harry Potter by J.K.Rowling
What do all of these have in common?
Characters with interesting flaws, or hobbies who come from unpleasant, though somewhat mundane situations.
That's what I've decided.
In the YA books by Rick Riordin, both the Percy Jackson series and the Heroes of Olympus series, (I prefer the later, probably because I identify with the characters.) there are all these kids from single parent families who mostly didn't even know who the other parent was. They were trouble makers who'd been kicked out of multiple schools. Kids diagnosed with learning disabilities, dyslexia and ADHD. But all of that is okay. It's just part of being a demigod. It's actually better senses and reflexes as well as a brain hard wired for Greek (or Latin). There's more depth to it than that. They aren't Mary Sues and, frankly, I'd have liked to slap some of the godly parents but that's sort of what the main characters get to do which causes me a squee of satisfaction and glee. They also get to go on quests, so adventure, albeit dangerous, and they get to spend their time in summer camp learning cool things, like sword fighting and making stuff like statues.
In the Wizard series by Diane Duane, kids become wizards. The younger they are, the more powerful they are. Kids who are curious and read a bunch become wizards. They do have to complete an ordeal, a sort of quest against a big baddy called the Lone Power but that's satisfying too, as well as kinda terrifying at times. Living dangerously through characters is pretty cool.
As for Harry Potter, his life sucks at the beginning and then he becomes the special boy, gets to learn cool things and gets to leave his horrible relatives far behind for a decent chunk of each year. What's not to envy?
Twilight, well, Bella's life is kinda blah. Edward certainly fixes that though even then it's a bit bleach. There's also romance and the ultimate bad boy who can't help what he is, if you're into that.
There we are. I don't think this is a great revelation but the thing that ties popular young adult fiction together is identifying with the characters and gaining a burst of emotion from living vicariously through them.