Absentee or dead parents/guardians/adults have long been a part of middle grade and young adult books. After all, adults are often sensible enough to keep kids from getting into the messes that send them on the grand adventures that books revolve around. But there are plenty of well-written books with present parents that prove otherwise.
For the sake of this list, I only included biological/adopted/step-parents, no adults who behaved in a parent-like manner (like Hagrid in Harry Potter). I also noticed that my choices were primarily from contemporary fiction, with one sci-fi, one fantasy, and one paranormal. So I think there's still room to improve parents in books besides contemporary YA, but I think this list will prove that contemporary YA itself is doing a pretty fine job (especially in recent years).
1. Lucy's mom in The Names They Gave Us
Of course Lucy is at a different camp from her mom for large chunks of the book, but her mom is constantly on her mind and when we do see Mrs. Hansson, she is loving, wise, and involved. And this isn't to discount Lucy's dad; he does a good job as well, but he's not as important to the story as her mom is.
2. Taylor's dad in Second Chance Summer
I love how well-written Taylor's relationship with her father is, and Morgan Matson did such a good job balancing every relationship in this book, but Taylor and her dad are the stand-out pair.
3. Marguerite's mom and dad in the Firebird trilogy
Because of how this trilogy works, often Marguerite isn't interacting with her actual parents, but versions of them in parallel universes. But in pretty much every universe (including Marguerite's own), her parents are strong, loving (towards each other and their daughters), and smart.
4. Lara Jean's dad in To All the Boys I've Loved Before
Dr. Covey is a single dad, but he still knocks it out of the park. Of course, both Margot and Lara Jean stepped up to the plate to fill the void left by their mother's death, but he's still involved in his daughters' lives and sets ground rules.
5. Miri's dad in Princess Academy
Although he's a quite type, Miri's dad clearly cares for his daughters and would do anything to protect them.
6. Blue's mother in The Raven Cycle series
Although Blue has numerous mother figures (since she lives with so many female relatives), Maura is actually a pretty good mother. She's protective but also smart enough to know she can't always save Blue, and she's also smart in general.
7. Nikki and Maya's parents in This Side of Home
Although it's been a while since I reread This Side of Home, but I remember enjoying their smart, driven, loving parents who cared about their community.
8. Maguire's mom and stepdad in Girl Against the Universe
Of course Maguire's relationship with her mom is super strong, but I was pleasantly surprised by how well her stepfather was written. (Which tells you how often stepparents are cliche monsters in fiction.) He cares for Maguire like she's his own, and he wants her to succeed and overcome her fears.
So take note, authors. Readers definitely want more positive family relationships in the books they read.