Are Human Rights a Legal or Moral Matter?

Are evils like rape, murder, or torture wrong because they are immoral or because they are illegal?