It works for both, but more so for women. In fact, if you start comparing pairs of men/women, the attractiveness of the woman a man is with is more significant than the attractiveness of the man when people form first impressions of the man.
The Effects of Attractiveness on Popularity
Granted, their own experiment was conducted in a bar, which probably has an impact on the results of their experiment, but they also cite some other studies which support the idea that popularity is directly related to attractiveness.
Of course, not only did they observe how many times a person was approached by someone else in the bar, they also observed how many times a person approached someone else. Attractive people are more likely to approach other people which can definitely affect a person's popularity.
It might be true that attitude is the most important determinant of whether a person is popular and the main impact of attractiveness is on the person's own self-esteem and confidence. An attractive person who's afraid to talk to people isn't going to be very popular.