Extreme Punishment

When laws are broken, human society demands justice. But who decides which punishment fits the crime?