Q:

Why have historically most inventors been men? 

I noticed something strange when I looked at about.com's list of famous historical inventors.  You can see that most of the inventors are men, and only a few are women. 

Can this be explained by cognitive science in terms of men's brains having better abilities for inventing something?  
Or is this due to social factors or something else? 

A:

A large part is cultural, because, until recently, the people with the best education and most of the money have been men. 
Sexism kept women out of schools for a long time.  It also kept pushing women into what were perceived to be more appropriate studies (nothing technical) when they were allowed into schools. 
Have a look at the sexism page at Wikipedia. 
There is some evidence, as discussed in this Wikipedia article, there are differences between male and female human brains.  Especially in spacial temporal reasoning regions and the language areas.  As well as Wikipedia, in the book Cognitive Neuroscience: The Biology of The Mind[1], the authors state that human females are less good at the maths people are taught at school, which is linked to spacial reasoning. 
However, this disparity is across the species as a whole.  It is an average.  Inventors, by their very nature, are not average.  Thus the neurological differences are not the main contributing factor to why you see more men in your list than women. 
Also, have a look at confirmation bias. 
[1] Cognitive Neuroscience: The Biology of The Mind, 2nd ed.  M. S. Gazzaniga, R. B. Ivry, G. R. Mangun.  Page 602

A:

This is a big topic, which I don't feel I can do justice to, but here are a few thoughts nonetheless.  It's also important to see how resort to biological arguments could help to perpetuate such gender differences. 
Brain is not behaviour
Brain differences are irrelevant if they do not manifest in behaviour.  Thus, to show that size of structure of the brain varies between genders may be suggestive.  However, to use this to explain gender differences in the historical differences in inventors is a big leap. 
Empirical evidence for gender differences
The best data I've seen examining the size of gender differences on a wide range of psychological variables was the summary of meta analyses by Hyde (2005).  
Hyde puts forward

the gender similarities hypothesis, which holds that males and
  females are similar on most, but not all, psychological variables. 
  Results from a review of 46 meta-analyses support the gender
  similarities hypothesis.  Gender differences can vary substantially in
  magnitude at different ages and depend on the context in which
  measurement occurs.  Overinflated claims of gender differences carry
  substantial costs in areas such as the workplace and relationships. 

In particular, check out the first section of Table 1 of Hyde (2005) where you can get a summary of meta-analyses of gender differences in cognitive ability.  In general the differences between males and females tend to be fairly small, and there are several meta-analyses that found females to have slightly superior ability to males.  Furthermore, such studies don't prove whether the generally small differences observed will change in the future should society change in its treatment of males and females. 
What makes a great inventor? 
I imagine that all sorts of factors related to social context, individual traits, and learning experiences would be related to the emergence of great inventions.  
Furthermore, the emergence of great inventors is often seen within a broader historical context, which encompasses periods of time where women's access to education, access to career opportunities, and role expectations provided minimal opportunity to become a great inventor. 
I think the expertise literature would provide a reasonable lens for thinking about what it takes to become an expert.  E.g., check out some of the articles by K. Anders Ericsson.  It emphasises the importance of spending thousands of hours of practice and effort in acquiring the skills required to become an expert.  
Thus, we might switch the question around to say, what causes someone to spend thousands of hours devoted to learning and developing skills relevant to making a great invention? 
References

Hyde, J. S. (2005).  The Gender Similarity Hypothesis.  American Psychologist, 60, 6, 581, 592.  PDF

A:

First of all, I agree that socialization and culture are most certainly the main reasons why today most famous inventors are male. 
If you are looking for sex differences that may explain further variance, studies have found that the variance in IQ (g) among males is greater than among females:

Some studies have identified the degree of IQ variance as a difference between males and females.  Males tend to show higher variance on scores, though this may differ between countries.  A 2005 study by Ian Deary, Paul Irwing, Geoff Der, and Timothy Bates, focusing on the ASVAB showed a significantly higher variance in male scores.  The study also found a very small (d' ≈ 0.07, less than 7%, of a standard deviation) average male advantage in g. A 2006 study by Rosalind Arden and Robert Plomin focused on children aged 2, 3, 4, 7, 9 and 10 and stated that there was greater variance "among boys at every age except age two despite the girls’ mean advantage from ages two to seven.  Girls are significantly over-represented, as measured by chi-square tests, at the high tail and boys at the low tail at ages 2, 3 and 4.  By age 10 the boys have a higher mean, greater variance and are over-represented in the high tail." 

(see Wikipedia for references)

