Protecting Electronics From RFI and EMI
Optoisolation assumes you have DC power on both sides but gives good isolation.


Another way to isolate sensor from large common mode , CM, noise that may exceed CM input range of Op Amp is using a large CM choke to raise CM impedance  with cap to ground to attenuate CM noise.  Current Loop sensor offers some CM immunity but only from DC drop to some lower frequency than what CM choke or " Balun" can do.
Using shielded pair or twisted pair for all connections also reduces ingress of noise.
Ferrite beads on interface signals is also common to suppress RF noise.
DC-DC converter may also be another source of radiated noise. So isolation and shielding can be useful.  
Usual method to determine EMI problems is to use a scope probe with shorted tip using ground clip or loop antenna to sniff for radiated noise near sources or ambient for noise >10MHz to determine what noises you can expect from arcing motors or relay contacts.


The PV panel may need lightning transient noise protection with CM choke as well and RF plastic cap to ground.


Isolation is not always ideal .
opto has lower capacitance than transformers used in SMPS which improves RF noise and power line transient isolation if this is a problem.


Only you can determine the requirements by doing an evaluation of site noise levels or testing the product by simulating arc transients with electric drills, cap discharge to plate antenna, power line transient, HIPOT, ESD generator (3 to 15kV discharge from 300pF cap+100R) etc etc.

A metal enclosure may be better or worse if poor grounding than metallic sprayed plastic, but both serve a purpose.