You are more than likely bright enough to realize the students were making a political statement with those t-shirts. They even freely admit it.
So what? Are other students allowed, at other times, to make political statements? If the answer is "no", then sure, not allowing flag t-shirts is fine. However, if other students are allowed to make political statements, then you can't tell them they can't make political speech. A "hostile learning environment" is irrelevant: any political speech of any kind is going to offend someone, so if you're allowing some political speech but not others, then you're discriminating and playing favorites. It's not the school's job to select which political opinions are OK and which aren't.