These resistors and capacitor are probably physical, real components installed inside the module.
The left-most input resistor is clearly for current limiting, which is why you can connect 12V or 24V directly to the input. You wouldn't be able to do that directly across the LED without destroying it.
The right-most resistor is no doubt to prevent small currents from illuminating the LEDs. LEDs tend to glow quite brightly with only microamps of current, and that resistor provides a path for it, rather than through the LEDs. Such current can be due to electrical noise, or magnetic induction, and module this appears to be for use in an industrial setting, where there's plenty of sources of those.
The capacitor is probably another measure to mitigate noise picked up from nearby sources. In combination with the left resistor it slows the rise and fall of LED current, by forming a low-pass filter.