My take is very simple:
-are they actively targeting civilians? If yes then bad:
-Israeli government- yes, then bad.
-Hamas- yes, then bad.
-are they following what is recognised as international law (namely the 1993 Oslo agreements):
-Israeli government- while they formally recognise Palestine as a state, they have consistently undermined the Palestinian authority and occupied much of the West Bank without a plan for either self governance or leaving, settling parts of the West Bank aggressively, therefore bad.
-Hamas- does not recognise Israel in any way and openly calls for its destruction, therefore bad.