I know most of the men were away fighting with Robb, but how could Winterfell be taken with 20 men? Winterfell is a city, right? There should be some population there that could fight back.
Winterfell is more a fortress than a city.
The issue was that Theon attacked Torrhen's square as a distraction, and because of that Winterfell was emptied of all its remaining garrison - the only people left were children, old men, women, and a few non-soldiers (such as Mikken, the blacksmith).
After that, Theon seized Winterfell by scaling the walls at night and quickly getting to Maester Luwin to stop him from sending ravens.