It depends slightly; some guys can have hair brushing their shoulders and it doesn't look "long," other guys need to stick with buzz cuts. But I NEVER like the look of deliberately "long" guy hair, and it's a reaction that goes beyond surface looks. To me, long hair usually signals that the guy is vain or arrogant. Or else trying to look like a girl, which is even more repulsive.
Sort of exceptions might include guys like Vincent Valentine, where the long (ignored) hair means self neglect, but yech, imagine how it must smell after years of no barbering.
in anime, I don't care as long as they're hot, but I'm usually attracted to a friends or side characters (lavi, kanda, hijikata, riku, hibari, anyone but the main character XD). In real life, I'm usually attracted to guys with short black hair for some reason.