How long do I have to be sleep deprived before it shows effects on my immune system?

Chronic just as bad. Sleep deprivation definitely affects the immune system. Chronic sleep deprivation (insomnia, sleep apnea, etc.) definitely affects the immune system.
Other systems. Sleep deprivation is likely to affect other functions before it impairs the immune system. Do not try to gauge the amount of sleep needed by your immune system as it is not easy to test quantitaviely.
Uncertain, unknown? A body that is very fatigued, due to a lack of sleep, excess stress, being overworked, etc..., may get sick more easily. This concept is difficult to prove. Maybe a person's internal biological rhythm is disrupted, leading to changes in one's natural cortisol levels, which will alter one's immune system functioning and change the ways his body responds to additional stress.