Yes, you definitely have to keep an eye on what's going on with your kids and who they're hanging with.
It's definitely much more of a nuanced situation than screening parents, however ... plenty of kids from rougher/less-privileged upbringings are of fine character and are good influences, and plenty of kids from "blessed" upbringings with the bestest parents turn out to be Satan's spawn (Eddie Haskell style, but more nefarious). Those latter situations often involve those parents attempting to blame everyone else when their kids inevitably get into trouble, and then they send them to fancy private schools to get away from the dastardly outside influences that put a black mark on his reputation ... and there, they become even bigger menaces. It's almost like the other kids weren't the problem, after all.
My older son had the chance to be part of the "sports crew," but I'm happy to say that he selected the "nerds," instead. Still gets along with the sports kids, and plays sports ... he just hangs with the kids who code, and have bright futures, for the majority of his time. He's a quiet, nice kid and he naturally gravitated toward the same. A lot of those sports kids have parents who are teachers and HS coaches ... and a bunch of those kids are the drugged out alcoholics who tend toward casual sexual assault at parties. And they can get away with acting like that.
The younger one gets along with absolutely everyone ... including the "bad kids" and he sees the good in them, too ... and helps them out ... he just knows enough not to get involved in their shenanigans. It helps that he's got natural leadership qualities and he's smarter than his teachers. He's got separate groups of friends - his sports buddies, who he gets along with and chats up all the time at activities and in school, but doesn't really "hang with" that much outside those things ... and "the Indians" - the super-smart kids from his class who all happen to be Pakistani/Indian and have crazy names I can't remember ... so I just shorthand it to "the Indians" when referencing them.
But there's plenty of trouble to get into if a kid wants to find it, or is rudderless enough to let it find him ... even in very well-to-do areas.