It's not a matter of "lighten up". It's a matter of "stop being sexist and hostil to women". The onus is not on the victim to change her behaviour, but rather very much on the transgressors!
I'm not trying to justify the actions of people in IT. I'm all for it to become the paragon for the treatment of women and set the standard for the rest of the working world. However, I'm not sure IT is unique in this regard so it does not really explain why woman are drawn away into other, just as hostile, professions.
What industries do these women participate in?