I've been in charge of hiring IT folks in a couple of area's before, and I can tell you, the answer is YES. It may not be 'fair', and they may not even 'ask' you to cut your hair.... If I'm hiring someone for an entry-level position, I'm not risking much, so I can take a chance on someone that doesn't "look the part". However, if I'm hiring for someone for a serious position, I have to feel comfortable that I'm getting the right person -- after all, I'm investing lots of money, training etc into that person. I don't have much to go by to really 'know' the person. Personal appearance figures into the equation more than anyone will tell you. Look like a skuzz, and you won't land any serious jobs, unless you're the only one qualified to do it.
The key is to "look the part" for the job you want. If you want to work at a bank as a financial analyst, you'd better show up in a conservative suit, no earrings etc etc, or you won't land the job - regardless of qualifications. The same holds true in other fields as well.
I'm not arguing whether it's "fair" or "just" or good or bad, I'm just stating the facts about how appearance factors into evaluations.