Hats give an additional multiplier to your birds and the more pearls the hat costs, the higher the multiplier. When you are able to collect all of the hats from the same set, your slingshot will be upgraded and it will also give a higher multiplier to your overall score.