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.
By having insider knowledge he only needed 20 men. Add the fact that all the men-at-arms were away doing battle as well as the fact that Bran was captured at the start of the siege.
Theon takes Bran and forces him to surrender. Bran's subjects have to abide by their Lords decision.