Actually, we haven't evolved past the need for hair. The hair on our heads not only keeps our heads warm, it is a primal part of our natural plumage, used to attract mates, and thus continue breeding. You'll note that while bald men may get dates, they get fewer than men with full heads of hair and bald women don't get dates often, if at all.
To trap in the heat. The top of your head is very sensative to heat. Also, sweat glands are at the end of hair follicles. Sweating allows you to lose heat/evaporate the liquid. It is basically to maintain your body temperature.
as for head hair, its sexual selection from when we first evolved. those with nice hair are more often selected as partneers. some vestigal regions remained to fulfil this need.