Think about what you're asking. A cut off age??
Does your library have sections where only certain age groups are allowed?
Does your local bookstore prohibit potential book buyers from entering certain sections based on their age?
And if someone decrees that YA books are only for those 12 and older, wouldn't that make them even more appealing to 10 year olds, desperately wanting to see what all the fuss is about? Do you really think you can keep those books out of the hands of anyone who really wants to read them?
There is no cut off because every reader matures at a different rate. Publishers might suggest middle grade books are intended for middle grade age readers but that never stopped millions of adults from reading the Potter books. I'm sure many middle grade aged readers prefer more mature and challenging themes in their reading. Young adult books are read and enjoyed by everyone. Many teens prefer and devour adult level fiction. How many 12 year old boys have Playboy magazines hidden under their mattresses, do you think? Parents might prefer their younger children weren't exposed to mature themes until later in life, but I don't think you can classify genres with rigid cut off dates.
In general, I think it might be safe to say that where middle grade novels leave off, young adult novels pick up, and after that adult.
As for appropriate themes for each level....one of the defining features of young adult literature is a freedom to explore sensitive issues...a freedom that's rarely found in middle grade books. Not all YA books explore such issues, of course, but the freedom is there.
Whether schools and libraries and parents choose to expose younger readers to such themes is a matter of individual censorship. Catcher in the Rye is still banned in a lot of places. Nearly every YA book I've read recently deals with sex, drugs, booze, and even incest and abusive situations. These aren't issues to avoid. Teens are surrounded by difficult situations. Good YA books help them explore these tough issues in a vicarious way.
It's really not a question of age appropriateness. It's a matter of maturity level. Publishers tend to group novels dealing with sensitive issues as YA. Even if the MC is 10 or 12 years old and the content is sensitive, it'll likely be pegged as a YA. Most times though, the MC is nearly the age of the intended reader or slightly older. Most 18 year old readers aren't too interested in the problems of a 12 year old, having already lived through that period.
In an honest effort to answer your original question though, the best I could do is say most YA books are meant for high school age readers.
Anyone with middle grade school aged children knows, however, that the issues of booze, sex, and drugs, are not confined to high school. You'd think these middle school kids would be the most in need of help in exploring such difficult problems.
I certainly don't mean to sound flippant but definitive age cut offs are simply not reality. As always, I think we writers need to focus on writing the book and the story that is within us as best we can and leave the marketing for others. Or at least leave the marketing and labeling process for after the work is finished. Our work will find its own market if we let it.