I wouldn't work in a team with a suspiciously high % of females. Nothing against female programmers per se, but if a company values my contributions less than a female's simply because I have a penis (which seems to be the case with most so-called "gender equality" programs) then I don't want to work for/with them.<p>So I'd say yes, it's okay to ask.
I'm mortified that the "why is it important to you?" comment has so many votes.<p>Protip to men: if you find yourself being reflexively defensive whenever you have to <i>think</i> about gender equality in this industry, you're part of the problem.
I'm a woman and I totally understand why another woman would want to know that. And when I've been part of an interview panel, the panel was asked that. I responded that we have a mix of genders and ethnicities.<p>On the flip side, I've never asked that when interviewing for a position myself, though I've always been curious; I just assumed that asking would blow my chances of getting the job. I've always assumed that the team would probably be all male. And that it could be OK for me either way, depending on the personalities and attitudes of the team.