The Supreme Court on Thursday agreed to decide whether states may ban transgender students from playing on sports teams that align with their gender identity.