Hats.
They add a little customizable look to your characters. They are all class specific, but some such as the Ghastly Gibus (old gay top hat), Cheaters Lament (halo), Bill's Hat (beret) and probably some others I can't think of right now can be worn by multiple classes.
The only value they have is their look. Some hats are incredibly awesome. Some hats suck. It all depends on your opinion and hats are being added daily as is with todays update to TF2, adding a couple new community-made hats. They replace any hat that the class was already wearing by default.
They do not affect gameplay in any way what so ever, and can be even changed.