SSR or solid state relays input resistor recommendation app note from Vishay. Link here (PDF)
Solid state relays (SSRs) are commonly driven by TTL or buffered CMOS logic gates. These gates, when used to sink current, provide adequate drive for SSRs. An open-collector output is not required to drive the SSRs, but it can be useful to perform a logic OR function.
A quick recommendation for 5 V power supply operation of most SSRs is to use a 560 ohm resistor. This combination provides an LED current range of 5 mA to 9 mA, thereby optimizing LED current, surge capability, and turn-on/off times. This calculation has taken into consideration power supply variations, temperature variations from – 40 °C to + 85 °C, and manufacturing variations. It uses a 10 % tolerance, 300 ppm/°C input resistor. Likewise, for operation to only 70 °C, a 680 ohm resistor would suffice.