metal tends to align itself as a counter-culture, criticizing social standards and pretense.
in such a way, long hair (or rather the refusal to cut hair) shows a protest against the taming and shaping of one's image to societal "standards". currently the typical male image has short hair of one of several different styles. these styles represent, to those who are opposed to that culture, a sign of conformity and submission.
we must remember that metal is not the only genre that typically (but not universally) aligns itself this way: there is also the prime example of reggae dreadlocks, which share the long hair for similar reasons.
long hair also symbolizes freedom, as it is free to fly around in the wind, uncontrolled.
it is also a symbol of nature, and the wild- in the sense that in ancient times, every human had long hair because they did not yet develop the means to cut it.
in some cultures, longer hair symbolized older growth and therefore also more wisdom. samurais grew long hair and tied them in "topknots" which were the physical symbol of their honor, it was a massive disgrace for a samurai to have it cut.
there is also the biblical reference, though i doubt many metalheads grow their hair out in belief that it is a symbol of power like Samson, and that if cut, they will lose that power.
personally, i like longer hair because i think it looks good on me, as well as a combination of the freedom and social/political statement reasons above.