Obviously there are a lot of bitter people answering here, so I will try to put an objective spin on it.
The answer is that there is a mixture of criteria, which are sometimes based on barrel length, and sometimes based on "just because".
Barrel length issues are generally based on how concealable the firearm is in case it is meant to be used for murder, and Prohibited firearms are also based on calibre and barrel length, once again because these firearms have a really high probability of being used for murder.
Then you have rifles like the AR family which are Restricted instead of NR, compared to similarly capable semi-auto rifles like an SKS, Tavor, Benelli MR1, etc. In these cases it is based on a thought that a person planning something bad is generally going to use an AR, which makes them scarier than the other options.
Further, you have to take into account the magazine capacity rule, too, and at that point it arguably gets even more stupid. I have a Restricted 10mm Glock G20 pistol, for which I am allowed 10 rounds, and someone else with an AR15 is only allowed 5 rounds. In close spaces, theoretically I could do far more damage with my 10 round pistol than a 5 round AR, but that would be missing the bigger point:
Any of these "laws" are completely ludicrous if they are based on a probability of reducing murder, because the last thing anyone committing murder is worried about is if they are also committing firearms violations while they are committing murder.
Therefore, arguably you end up with a lot of bad guys still using Prohibited pistols, and rifles with Prohibited 30-round mags, because they don't care about such regulations. And you have completely law-abiding people on the other side of the fence, who by the good of their hearts are re-loading five round mags ad-nauseum at the firing point of a range, for fear that they could be sent to jail if they tried to get more than one grouping out of a magazine.
In summary, it is a combination of factors based on how dangerous some people think some types of firearms are. Their decisions are based on some logic, because if a firearm is more concealable and carries more rounds in the mag, of course a person could do more damage with it. However, what is completely ridiculous is that the irony is somehow completely lost on the decision makers that inevitably they are only restricting law-abiding people because criminals with malicious intent don't really care SFA about barrel length or magazine capacity.