The objective of this study was to estimate the relationship between the prevalence of asthma in schoolchildren aged 6-7 years and 13-14 years and the mean annual sunny hours (MASH) in Spain, and to explore predictive models for asthma prevalence. The prevalence of asthma was obtained from the International Study of Asthma and Allergies (ISAAC) Phase III 2002-2003, and climate and socio-economic variables from official sources. Nine centres were studied and a further four centres, two of which are in ISAAC, to test the predictive models. Logistic regression was used to estimate adjusted prevalence rates of asthma for each centre, and multiple regression models to study the effects of MASH and other meteorological and socio-economic variables. The adjusted prevalence rate of asthma decreased 0.6% [95% confidence interval (CI) 0.4-0.8%] for the 6-7 years group and 1.1% (95% CI 0.8-1.3%) for the 13-14 years group with an increase in the MASH of 100 h. Relative humidity was negatively associated with asthma in the older age group, and gross province product per capita (GPP) was positively associated with asthma in the younger age group. The predictive models, which included MASH, gender, relative humidity, and GPP, anticipated prevalence rates of asthma without significant differences between the levels observed and those expected in 9 of the 11 measurements carried out. The results indicate that sunny hours have a protective effect on the prevalence of asthma in schoolchildren.