I don't know why he's stupid like that. But yes, he is stupid. There are a lot of guys who are stupid like that, and they seem to genuinely come by this particular brand of stupidity for no reason. I mean, not only did he bash your suit, and the money you spent on it, but he then followed up by insulting you and saying you need a tan? That's some powerful assholery right there. Why not just call you fat too, just to finish you off? Jesus.
I think you should tell him what he did. Tell him he was being a jerk. That this swimsuit meant something to you. That you were hoping he'd be a little more excited, and not follow up such disappointment by insulting you so. I think he needs to know what he did wrong. It might help, it might not, (More likely not.) but you gotta try.
Don't worry. Not all guys are this stupid about this kinda stuff. Some guys know how to pay a proper, sincere compliment without being forced. Some guys actually care about things like what a girl wears, or her fashion choices. In his position, I think most other boyfriends might even have gotten an erection and dragged you off to a secluded room. Maybe this guy is just not for you.
Still, I think you should talk to him.