Human body hair is a topic which both sides of the evolution / young earth creationist debate claim as proof of their side being correct. Those who think evolution is a valid theory point at the hair and call it a vestigal organ, part of the general move by primates towards less hair. Creationists point out that it's still useful for something, and claim that is proof of a creator. Unfortunately, there is not a staggering amount of hard research that's gone on in this area -- it's hard to prove anything in evolution without a record of the past, which is missing for the most part in the case of hair (information about which is not conveyed in fossilization)
First, humans are part of a trend. Primates have been moving towards hairlessness: old world monkeys have an average of 170 hair follicles per square centimeter, apes have 90, and humans have around one. Of course, we have more in certain places: the scalp, the armpit and pubic areas, and face in males.
So why do we still have these somewhat odd patches in the armpits and pubic region? Part of the reason is friction. In the armpits and pubic areas, the hair acts as a lubricant between the two patches of skin that would otherwise rub together uncomfortably. The other reason might be that the hair catches the scent which is produced in these areas. In both the armpit and the pubic area, there are special sweat glands, the apocrine glands, which produce a far more nutrient-rich sweat than is produced elsewhere on the body. This sweat conveys quite a lot of olfactory information about the producer, which makes it attractive to mates. Unfortunately, it also makes these areas great petri dishes; hence the unpleasant body odor that results when you exercise for a long time. (As an aside, showering, then brief exercise, is said to be the best way to make yourself olfactorally attractive to the opposite sex)
So that at least partially explains the armpit & pubic regions. So why do we only have long hair on the top of our heads? The answer (probably) lies in our temperature regulation systems. The fact that we sweat means that we could, and in fact had to, lose most of our body hair in order to allow the evaporation to regulate our temperature. In cold, our skin's blood flow can be cut down to reduce the heat loss (resulting in numbness, but no starved cells). However, our scalp's blood flow must remain constant and its contents are especially sensitive to temperature changes. So the hair on the scalp probably remained in order to keep our noggins toasty warm.
There is some debate on whether the hair we have has also stayed around as a secondary sexual characteristic, to advertise our health (shiny hair is healthy hair) and ability to bear young. In my opinion, and the opinion of many of the sites I read while researching, the sexual attraction to these characteristics probably arose after they became prominent in the species, instead of arose because the species selected for them. And the sexual dimorphism in body hair thickness and facial hair is probably merely a side effect of the testosterone levels in males, rather than a selected-for attractor.