To dream that you are being sentenced indicates that you need to take responsibility for your actions and confront your problems. Alternatively, the dream implies that you need to verbalize your feelings and thoughts. If someone else is being sentenced, then you feel they need to take responsibility for their actions. Consider the severity of the sentencing.
In particular to dream of a death sentencing symbolises the limited time you have to react or to do something. Dreaming of a prison sentence indicates that you are being held back on some area of your life.