This study was conducted to investigate the factors associated with depression according to the age group of the subjects, namely, young, middle, and late adulthood (YA, MA, LA, respectively). The study also sought to confirm the factors related to depression and their association with diet. Raw data from the 2016 and 2018 Korea National Health and Nutrition Examination Surveys (KNHANES) were used. The subjects of the study were adults, divided by age into YA (under 40 years), MA (between 40 to 65 years), and LA (over 65 years) groups. Among them, patients diagnosed with depression by a physician or with a patient health questionnaire-9 score of 10 or above were assigned to the depression group. Other subjects of the same gender and age were selected as the normal group using the Propensity Score Matching method. Accordingly, the final subjects for analysis comprised 286 in the YA, 462 in the MA, and 528 in the LA groups. A decision tree analysis was used to predict the factors influencing depression as follows: In the YA group, the factors were lifetime cigarette smoking; BMI distribution and fiber intake; breakfast companion. In the MA group, they were income level; BMI distribution, walking, lifetime cigarette smoking, vitamin B2 intake; Niacin intake, percent of fat intake, and fiber intake. In the LA group, the factors were Income level; Food security status, walking, and nutrition label recognition; Lifetime cigarette smoking, walking, breakfast companion, and fiber intake. This study confirmed that dietary factors, which had not emerged as being of significance thus far, should be included in the prevention and appropriate management of depression.