WASHINGTON—A divided Supreme Court on Monday struck down mandatory sentences of life in prison without parole in two cases involving 14-year-olds convicted of murder.

In the court's third decision since 2005 to find that tough sentences for juveniles violated the Constitution, Justice Elena Kagan, writing for the 5-4 majority, said earlier high-court rulings "make clear that a judge or jury must have the opportunity to consider mitigating circumstances before imposing the harshest possible penalty" on those under the age...