A former University of Virginia student was sentenced on Friday to life in prison for fatally shooting three football players and wounding two other students on the campus in 2022.