Factors that can weaken the immune system include stress, lack of sleep, poor diet, and smoking. It is important to maintain a healthy lifestyle to keep your immune system functioning at its best.