Indonesia is a country with a tropical climate with sun exposure throughout the season, because sunlight is the largest source of vitamin D. The risk of vitamin D deficiency can lead to respiratory problems. With good self-management, of course, adequate knowledge and attitudes are needed in overcoming various individual health problems. The purpose was to influence knowledge and attitudes towards sun exposure in meeting the need for vitamin D to improve lung function in healthy respondents without chronic respiratory disorders. The research will be conducted using a cross sectional design, in May-August 2019. The variables were knowledge and attitudes towards sun exposure related to the risk of vitamin D deficiency and lung function by forced expiratory volume in 1 second (FEV1) and forced vital capacity (FVC). Respondents used in this study were 168 respondents. Most of the respondents had good level of knowledge (97 of 168), and most of the respondents had good level of attitude (115 of 168). There was relationship between the level of knowledge (p=0.000) and attitude (p=0.000) toward sun exposure levels related to vitamin D and lung function. And there was relationship between the level of knowledge to attitude on sun exposure levels related to vitamin D (p=0.000). Therefore, knowledge and attitudes on sun exposure related to vitamin D were important concerns to maintain healthy lung function.