When a judge decides what the punishment should be / how long it should be for a person guilty of a crime.

‘He was sentenced to 2 years in prison for stealing money from the company.’