ObjectivesTo investigate the association among sun exposure time, vitamin D intake, dietary patterns, and socioeconomic status in Portuguese children.MethodsParticipants aged 3–11 years (50.1% females) were recruited from public and private schools (n = 118) in the districts of Coimbra (n = 2980), Lisbon (n = 3066), and Porto (n = 2426). Parents reported their children's daily sun exposure time during the summer season and reported children's food consumption, including vitamin D food sources, using standardized questionnaires. Parents' education level was used as a proxy measure to the socioeconomic status (SES). The principal component factor analysis (PCA) method was used to identify dietary patterns. The eight dietary patterns identified were labeled in: “fast food”, “rich in vitamin D”, “sugary drinks”, “vitamin D”, “candies”, “supplements”, “rich in calcium” and “vegetables/healthy”. Linear regression analyses were performed to investigate the association between sun exposure time and dietary patterns according to SES.ResultsA total of 4755 children were included. Children from high SES had significantly longer sun exposure time (p < .001) and more frequently consumed vitamin D supplements (p < .001). “Fast food” pattern showed a negative association with sun exposure time in medium and high SES (p = .014 and p < .001, respectively).ConclusionChildren with lower SES spend less time exposed to the sun, consume fewer dietary sources of vitamin D, and consume more foods rich in fat and sugar.