Evidence about the impact of vegetable and fruit diversity consumption on the autonomic nervous system (ANS) functioning is scarce. In this cross-sectional study (513 participants, 49.9% girls aged 7 to 12 years), we evaluated the association between vegetable and fruit diversity consumption and the ANS in school-aged children. Dietary intake was collected using a single 24-h recall questionnaire. Fruit and vegetable diversity consumption was estimated by summing up all the different individual vegetables and fruits consumed in one day. Pupillometry was used to assess pupillary light response, which evaluated the ANS activity. Adjusted linear regressions estimated the association between vegetable and fruit diversity consumption with pupillary light response measures. There was a positive and significant association between vegetable diversity consumption and the average dilation velocity, a measure related to the sympathetic nervous system activity (β-coefficient = 0.03, 95%CI: 0.002; 0.07). Our findings show that vegetable diversity consumption is associated with the ANS response, a possible early link between diet and health in school-aged children.