It's because of Moriarty's previous line:
Moriarty: Your death is the only thing that's going to call off the killers. I'm certainly not going to do it.
The fact that he said "I'm certainly not going to do it" implies he could do it, which means there's something Moriarty could do to stop them, such as give a code word to the assassins, as Sherlock then points out:
[Sherlock begins laughing]
Moriarty: What?! What is it? What did I miss?
Sherlock: You're not going to do it. So the killers can be called off, then there's a recall code or a word or a number.
That there would be a code rather than just making a phone call is because all the assassins are most likely hired (or at least not close friends with Moriarty) and would need a way to confirm that they were talking to him rather than someone who had got hold of their phone number (such as the police).