Bureau of Justice Statics –State Sentencing 1986-2006. Sentence Length of State Prisoners, by Offense, Admission Type, Sex, and Race 1993-2009. Federal and a variety of other dated data collections for state sentencing available but hard to ferret out.
National Prisoner Statistics (NPS) Program - national- and state-level data on the number of prisoners in state and federal prison facilities. Includes race and sex of prison inmates, inmates held in private facilities and local jails, system capacity, noncitizens, and persons age 17 or younger. Different reports (such as executions, HIV) cover 1926-2016.
Sourcebook - United States Sentencing Commission - Federal sentencing from 1996-present. Lots of detailed data but PDFs only. Analytical and topical reports, and some downloadable data under Research tab.
State-by-state data from Sentencing Project.