An Oklahoma judge handed down the landmark decision as part of a lawsuit about the spread of the opioid epidemic in the state.