when the trial ends. This is the correct vesion. The trial ends once the sentence is made. Through the sentence, the judge tells what the punishment will be. For example, this can be basically going to prison or paying a bail.
These options are not right:
-when the criminal is arrested. The legal procedures start at this point.
-when the trial begins. The members of the jury and the judge start to evaluate the crime.
-when the crime is committed. This is the fact that will be punished. The sort of punishement is conditioned by the seriousness of the crime: the crime effects ,basically.