This statement is actually based on one of the moist important principles of Roman jurisprudence: `Nullum crimen, nulla poena sine lege,`that there cannot be a crime without a law.
This is both an essential definition of the concept of crime and also a legal protection for the individual. As a definition, it implies that law is a set of explicit statutes, and that the term crime exists not in the moral or theological realms of `evil`or `sin`but rather solely inside the framework of a legal system of definitions, that may be laid down in an axiomatic form.
This system (albeit one corrupted in 1984) serves in international law to protect the individual from arbitrary and post facto condemnations. If you are acting in a maaner not against the law at the time you acted, a dictator should not be able to make up a law and condemn you after the fact.