
I think that the long hair on rock musicians goes back to rock and rolls roots. Having long hair was considered to be rebellious and against social norms. When rock and roll wanted to be portrayed as the bad boys of music, they began wearing their hair long in order to be the rebels of music. I think it ended up just becoming a staple of rock music, even after it stopped becoming a symbol of social rebellion.
I think that long hair and music are associated together as 'heavy' music or 'rock' music. An example of this is Status Quo, they are well known and associated with their long hair, and probably would lose some of their support were they to stand there with short cropped hair!
Personally, I associate this with my teenage years, when I was growing up, heavy rock used to be the rage, and this is mainly the sort of music that I continue to have as my preference.