Figures 1 and 2 on the datasheet will tell you how to select the input resistor. With their example of 22k, it will turn on at about 55V and turn off at 12V, so it will still show “on” even in heavy brownout conditions. Say you accidentally fed it 240V, the input current would be 11mA RMS, which is still well below the 25mA maximum, so it’s a pretty robust device. Given that it can handle about 500VAC continuously when configured to switch on at 55V, I don’t think any glitchy noise on your AC lines are going to do it damage. Slapping a MOV on there won’t hurt, but I don’t think you need it.
Probably even cheaper and more effective than the MOV would be to use a small capacitor directly across the input pins to form an RC filter with corner at about 500Hz. That should be fast enough (compared to the cycle time) to not hurt the device’s response and to not much increase current consumption at 50-60Hz, but it will eat any very short/sharp spikes due to inductive loads coming on/off line. Say about 100n if R=22k for a 450Hz cutoff. Obviously use a high-voltage non-polarised capacitor; you would need to make sure the selected capacitor can handle the continuous current and do some testing. Or just do like the datasheet says and use only a resistor.
For detecting 24V, I suspect that having it turn on at about 12V-16V is a good idea. So maybe about 5k6-6k8 input resistance, which will mean it can survive being connected to 140VAC. 2k2 is I think a little too low - it will work and not be damaged by anything below about 55V, but it consumes way more current/power from the 24V line than is necessary.