One of the things you see and hear a lot of if you hang out in places with aspiring YA writers is people who say things along the lines of, "I want to write books for teens so they will have something good for them to read." And I cringe inwardly. So, here's the thing. I hang out in places with adult focused writers too, and I have never once heard someone say, "I wanted adults to have something good for them to read." And yes, teenagers are not adults. (And yes, teenagers are not the only people who read YA, but I am fine with working on the idea that they are the target audience.) And there is nothing wrong with writing a good story. Or the story you wish was there for you as a teen. But if you make your stories sound like healthy bran (not to disparage healthy bran, but let's face it, it's bran) - well who wants to read that?
Edited for spelling
Also, you have to love and respect teenagers. Otherwise, this is like someone saying well, I heard people were buying book X, and since I think book X is crap, clearly I can write a book that audience will love, because I write better. First, this may be your internal monologue (although dear God, I hope not) but saying that never worked for anyone. Talking down to your audience has never led to more success. (Unless you career plan is dictator. And even then I can see problems.) Also, I don't mean I knew I teen once I didn't hate. Or I am related to a teen that I love. Love and respect teenagers. That's how you know if you can write YA. Not just I know what teens should be reading.