I've thought about this perception a lot. I guess by my interests, my habits and my job, I'd fall squarely into the "geek girl" category. But I never really thought about it, and don't consider or label myself a nerd or anything like that.
I don't think it's a matter of girls being uglier in one group or another. But there are other explanations. For the most part, I think it has to do with how they present themselves. From what I've seen over the years, in general the "nerdier" a girl is, the less likely she is to care about fashion or her appearance than finishing her latest Sailor Moon fanfic. And when you have a circle of like-minded friends who are comfortable around each other, that pervasive and sometimes competitive idea that they should care about their looks starts to disappear. Next thing you know, you proudly resemble this:
Another thing, that the above image demonstrates, is that sometimes making terrible fashion choices and attempting to look like a kawaii animu character when you're over 200 pounds often draws more attention to you and makes things worse.
It takes time to style your hair and put on makeup in the morning. And that regimen can be very involved. My job is casual dress, and though I try to look professional and nice every day, it's hard to resist sleeping in when all of your coworkers are male and simply drag themselves out of bed to work every day. Especially when I work all day and go to bed so late. And even though I enjoy fashion and try to present myself reasonably well, when I go out and see women who work in more mainstream jobs with lots of other women, I feel like I look downright frumpy.
So I guess what I'm saying is a lot of this phenomenon has a social explanation.