this op-amp works as a comparator. when the input at the non-inverting terminal is greater the one at the inverting input( the Reference ) , the op-amp output will follow the +V (3.3 v) and if its the opposite, the output will be the -V
when your digital input is 1.5 volt, the voltage difference, between the two resistors is going to be 0 volt (1.5 -1.5 ), therefore the non-inverting input is going to be 0 volt as well which is less than the Reference voltage which makes the output of the opamp 0v
when the input is -2 volt, the voltage difference between the two resistors is going to be 3.5 (1.5 - (-2))volt, therefore, the voltage at the non-inverting input is going to be 2 volt :
(20/35)*3.5 = 2 volt (simple voltage divider)
which is higher than the reference, which makes the output of the opamp 3.3 volt (the +V terminal )