I discuss the subject here. The thing people forget is that Robb doesn’t make the decision to secede – his bannermen make it by acclaiming him King in the North, and at that point he has to accept their decision if he wants them to fight for him.
As far as justification – the last two Lords Paramount of the North have been executed by the Crown, two other Starks dead at royal hands, and now two more are held hostage. And there’s a royal decree that Robb and all his family, down to Rickon, have to go to King’s Landing. In light of the previous Starks who were unceremoniously killed when they obeyed such a decree, it’s hard to interpret that as anything else than a threat against Robb’s life and the lives of his entire family.
And at the time, Robb doesn’t have a legal alternative. Stannis hasn’t sent his letter or asked for Robb’s fealty, Renly has no right to rule. At that moment, it’s Joffrey or independence.