The first use of this word with this meaning was in Roman law, where it indicated the opinion of a jurist on a given question, expressed in written or in oral responsa.
In modern Latin systems the sentence is mainly the final act of any procedure in which a judge, or more generally an organ is called to express his evaluation, therefore it can be issued practically in any field of law requiring a function of evaluation of something by an organ.