The origin and biblical basis for the death penalty

What is the origin and biblical basis for the death penalty?