From my understanding of general health evidence, your best bet is:
* Avoid smoking and excessive drinking (excess is easier to reach than you think!).
* Eat a healthy diet (not too many calories, not too many carbs, not too much saturated fat -- in order of descending importance).
* Get regular exercise. Aerobic and anaerobic, plus flexibility. You want to be supple, strong and healthy.
* Avoid occupational hazards -- for the HN crowd, probably eye problems and posture problems. Just taking regular breaks from the screen will go a long way here.
* Make sure you get good healthcare, especially when you're older (60+).
* Have good genetics. (Sorry, not much you can choose about this one.)