Not much, it's mostly cultural. There is the explanation that mates with long hair were better suited for weather, but it's a really weak argument. Romans and Greeks for example, preferred short hair, often elaborate with ornaments attached. Long hair is a barbarian trait, since such people never really cared about style and just preferred a simple hair coat. It became really popular in medieval times and even more so during romantism.