There are a few, but similar, meanings depending on the context. In your case, the idiom is more literal: Foster children frequently wind up in a vicious cycle of drugs and crime in America-- statistically as a result of the nature of the foster care system. Let's call that path crooked. Your example suggests turning them from that path onto a "straight and narrow" one.
Another example would be to "aggressively explain" a counterargument such as below:
"I can't believe your cousin Mel! He has way too much money to be voting Democrat. Get him on the phone for me so that I can straighten him out!"
The other usage is more nefarious. It denotes a violent, or potentially violent, response.
"He's just sixteen, Daddy. He didn't know what he was doing."
"He slapped my daughter; now he's going to pay."
"What are you going to do? Please don't hurt him."
"Ha ha! I'm not going to jail for that piece of dirt. I'm just gonna call his dad. I imagine he'll straighten him out. I imagine he'll straighten him out good."