1 The Lannisters wanted him killed
The Lannisters were searching for a way to get rid of Robb Stark because his army was approaching them.
2 Tywin made an arrangement with Roose Bolton
Tywin made an arrangement with Roose Bolton to kill Robb in exchange of being the new lord of Winterfell.
3 Walder Frey betrayed Robb
Walder Frey betrayed Robb and agreed to be a part of the plot. See why Eddard Stark died.
4 Robb made a mistake by breaking Frey's promise
One of the reasons Robb died is that he broke the promise he gave to Walder Frey which stated that he would marry one of his daughters.
5 Robb married Talisa in the wrong time
One of the reasons Robb died is that he married Talisa during the war and before wedding Frey's daughter. (See Game of Thrones Season 3 Summary)
6 Robb ignored Catelyn's advice
Robb ignored his mother's advice of not marrying Talisa. Catelyn was concerned that Walder might get angry and she was right.
7 Robb never expected to be betrayed by Walder
Robb went to apologize to Walder but he never thought he would be betrayed by him. Robb , Catelyn and many of their men were taken by surprise. (See Game of Thrones Summary: Episode 3 – Season 2 – What is Dead May Never Die)
8 Walder didn't care about his own wife
Catelyn threatened Walder that she would kill his wife if anything went wrong but Walder was totally indifferent and he ordered Robb to be killed.