The procurement and production of energy have become a significant issue for energy needs, especially in industrial processes and household usage. The increase in urban activities and the industry has increased the energy needs in urban areas. Many researchers focus on the issues of conservation, sustainability, and energy saving. Solar energy and sunshine duration present a solution for sustainable development. This paper introduces the analysis of ground-based observations for sunshine duration and other related meteorological variables, i.e., climate elements and air quality index. Daily data of meteorological variables were examined to determine the changes in sunshine duration, a proxy variable essentially used to estimate solar radiation and plan air quality management systems in urban regions with other environmental factors. The analysis was performed using statistical methodologies. Utilizing multivariate statistical technique, which involves Principal Component Analysis (PCA as a pattern recognition method), the analysis of sunshine duration was carried out for Erzurum city in Turkey using variables in the atmospheric environment. PCA analysis with orthogonal rotations, i.e., Varimax, Quartimax, and Equamax, presented similar results. In annual and seasonal periods, duration of sunshine is negatively associated with precipitation. Furthermore, in winter, sunshine duration varies significantly with atmospheric pressure positively; in spring, with cloud cover negatively; in summer, with cloud cover, relative humidity, and minimum air temperature negatively. Additionally, the duration of sunshine on the previous day is significantly related to the air quality index.