Women seek fun, spontaneity, leadership, and charisma in a man. Programmers learn, through their profession, that predictability, routine, and certainty are virtues. Through their interaction with the computer, developers (coders) engage their logical mind, solving problems. A programmer’s communication with the computer is blunt, direct, and literal. A disconnect between work and life is created; it is so great that it is almost insurmountable for the professional programmer; he spends so much time interfacing with the computer that he does not learn the nature of women, and how to satisfy them. We must admit that the profession of programming is not a complete cause of this correlation, since the profession itself actually attracts men who are naturally introverted. Certainly, there are exceptions (extroverted programmers; programmers who do attract women). However (putting aside the nature of programmers), the generalization holds that programming nurtures the type of behavior and character that is generally unattractive to women.
One could say the same about most engineers. Why do colleges often have such a large imbalance in their male-to-female ratio in engineering schools, despite attempts to attract females into the discipline? Females are inclined to be attracted to almost everything outside of engineering; this is part nature and part nurture.
The solution for man is to align his career with his goal in attracting women for maximum success. Entrepreneurs are attractive. If programmers can learn to become more entrepreneurial, rather then being a cog in the corporate machine, they may have a shot. Alternatively, men who are already programmers can seek to manage projects and lead others, and evolve into the mature ideal man that a woman wants.
Update 5/30/2011: programmers should read this discussion to get some insight on the effects (especially temporary) of programming on their social skills: Programmer Psychology Issues