My first reaction is that he's being overstimulated in public places. Children can have sensitivities to different noises, too many people, etc.
My daughter struggles marginally with sensory issues and I've found that making sure she is adequately rested or not too hungry is the key to better behavior. Because it doesn't take much to over stimulate her, I have to work a little more at making her relaxed before we get in those situations.
When he acts out, ask him specifically why he is so upset. Try to find the root cause to the behavior and work from there. If he says "it's too loud" or "I don't want to sit here" discuss ways to work around that.... if it's too loud... tell him to think about songs in his head that make the noise quieter, of if it's hard to get him to sit still, keep a bag of eating out toys... toys he's only allowed to play with when you are out... they will stay new to him and keep him preoccupied.
Long story short... find the root cause and work on a plan to prevent or fix it.