I am teetotal and have been all my life, don't smoke or take narcotics, though I'll take the lower ranking NSAIDs fairly freely, in low doses. I won't take sleeping aids either, but I glug back plenty of coffee to get me going in the morning. I get probably my fair short of sore throats and other minor infections that comes from close proximity, but I've not had a day off work for sickness in 36 years of employment. Every few years I do have this strange habit of going down with flu 3 days into my holidays but I'm sure that's a coincidence.
I'm not that fastidious about washing hands (I know I should, I live on a working farm) but I'm always reminded that Howard Hughes, despite his paranoia in this area, still managed to die of an opportunistic infection when flying on a private jet.
The two things I do try to insist on is exercise of some description - I'm still playing rugby - and sleep. I'll tolerate one 5 hour session of poor sleep, but then I'll always ensure I have 7 hours of proper sleep the next night. I try to avoid naps.
Personally I think a key aspect is your mood: being depressed or unhappy can soon lead to getting run down, and a weakened immune system. Though we don't do God on Flyertalk, I think I've given enough clues over the years here that I'm religious. I've got an "up" and optimistic mindset, and I'm sure that helps.