Background: Sun exposure has consistently been associated with multiple sclerosis (MS) onset, but case samples are predominantly relapse-onset MS (ROMS), and risk estimates have rarely been reported separately for ROMS and progressive-onset MS (POMS). We aimed to determine whether sun exposure prior to disease onset was associated with POMS and whether the effect differed between POMS and ROMS. Methods: This nationwide case-control study included 153 POMS cases, 204 incident ROMS cases, and 558 community controls with data from two separate datasets: the PPMS Study (2015–2021) and the Ausimmune Study (2003–2006). Information on time spent in the sun before the first MS symptom, skin phenotype, and sun protection behavior was collected. Satellite data on ambient ultraviolet radiation (UVR) were used to calculate cumulative UVR dose. Unconditional logistic regression was used with adjustment for covariates. Results: There were consistent dose-response associations, with higher levels of UVR exposure associated with a reduced risk of POMS, both for leisure-time and occupational UVR from age 6 to symptom onset. Associations were overall stronger for POMS than ROMS. For example, cumulative leisure-time UVR dose (per 100 kJ/m2 increment) was associated with POMS (aOR 0.93, 95% CI: 0.91–0.95) and the association was slightly weaker for ROMS (aOR 0.96, 95% CI: 0.94–0.99) for age 6 to symptom onset (test for interaction p < 0.001). Conclusions: Low levels of sun exposure, throughout the whole lifespan, are associated with an increased risk of POMS and ROMS onset. The sun effects are usually stronger for POMS than ROMS.