Do they have the right to mock Muhammad? Yes. But it seems to me that the defenders of free speech come out swinging on the same side as actual Islamophobes and that defending this sort of thing too much leads one to glorify efforts to be as unproductively offensive as possible. It's one thing to make a political cartoon that mocks a government for its actions. It's quite another to deliberately choose the most important prophet of a religion and make extremely crude caricatures of him purely to get as much of a rise out of others as you can, or merely to show that you can.
It's like if schoolyard bullies find out that a classmate really likes cows, so they start cornering him and eating beef with exaggerated pleasure in front of him, or mooing at him, or showing him photos of dead cows at slaughterhouses, over and over, just to hurt the other kid and to prove that it's technically not prohibited by playground rules. Then the bullied kid has enough and injures or kills someone in the group of bullies. Obviously an awful overreaction, and worse than the bullying itself. Don't get me wrong, bullying doesn't warrant murder. You'll never find me saying that terrorists are better than caricaturing trolls. But I find it hard to believe that we're supposed to rally in defense of the bullies' right to pick on someone for no productive purpose. I'd rather criticize both deliberately offending people for no good reason, and terrorism. Obviously I'd criticize terrorism more, since while both are bad things, that doesn't make them equally bad, but the point remains.