A 20-year-old Northern California man has been sentenced to three life terms in prison for torturing and killing two children.