For me, there are a few different factors coming when choosing gender.
Firstly, I look if different genders have any different attributes or skills. If that's the case I decide which gender's abilities will benefit my play style the most.
Secondly, I think about looks (obviously). Some games have very badly animated or modeled males/females which brake or diminish my immersion. I tend to gravitate to females for the eye candy tho.
A big reason for picking one gender over the other (at least in MMOs) is other people's behavior towards females. Playing a female, most of the time, results in harassment even if you state that you are a dude. On the other hand, some more sneaky people can use that to their advantage, pretending to be frail and noob-ish in result gaining items, help and other benefits.
Personally, most of the time I pick a gender whichever I feel like playing at the time.
On a side note: I think this belongs in the gaming discussion forum.