Here's a closeup map of the Riverlands. Robb Stark's host was moving south from the Grey water Watch (mislabeled in the image) which is at the very top of map. They needed to go South towards Riverrun, which is the House Tully seat being besieged by Jaime Lannister (very bottom of the map). To do that they needed to cross the Green Fork, which was flooding at the time, so the only way to cross was to use the bridge spanning the Twins or go much farther south along the river, exposing them to Lannister troops and wasting valuable time. Hence the need to negotiate with Lord Walder Frey.
Relevant book passage (pp. 640-641 in my paperback copy in a Catelyn chapter):
Theon shook his head. "The river's running high and fast. Ser Brynden says it can't be forded, not this far north"
"I must have that crossing!" Robb declared, fuming. "Oh, our horses might be able to swim the river, I suppose, but not with armored men on their backs. We'd need to build rafts to pole our steel across, helms and mail and lances, and we don't have the trees for that. Or the time. Lord Typwin is marching north..." He balled his hand into a fist.
"Lord Frey would be a fool to try and bar our way," Theon Greyjoy said with his customary easy confidence. "We have five times his numbers. You can take the Twins if you need to, Robb."
"Not easily," Catelyn warned them, "and not in time. While you were mounting your siege, Tywin Lannister would bring up his host and assault you from the rear"