Well the word cool in this use means that the person is fashionably attractive or impressive. He's so cool. He's a cool guy.
The too always means that there is more than enough or an excess of something.
Add those together and you find this guy is too cool for school. He has too much cool in him to be at school, or he is too cool to be going to lame school.