Air pollution, particularly Nitrogen Dioxide ( \(\text {NO}_2\) ) and ground-level ozone ( \(\text {O}_3\) ), poses major risks to human health and the environment, making accurate forecasting essential for effective public health management. This paper compares several machine learning and deep learning models including Decision Trees, Random Forests, Support Vector Regression, Convolutional Neural Networks, Long Short-Term Memory networks, Prophet, and Transformers, for prediction of \(\text {NO}_2\) and \(\text {O}_3\) levels in Abu Dhabi, United Arab Emirates. Model performance is evaluated using symmetric Mean Absolute Percentage Error (sMAPE), Root Mean Squared Error (RMSE), and Mean Absolute Error (MAE) across forecasting horizons of 1 hour, 2 hours, 1 day, and 1 week. We find that Transformers yielded best results, with average sMAPE values ranging from 0.2354–0.2981 for \(\text {NO}_2\) and 0.2030–0.2719 for \(\text {O}_3\) . Convolutional Neural Network is the second-best performer for short- and medium-forecasts, while Prophet is second-best for longer horizons. We also observe improved prediction accuracy when the inter-pollutant correlations between \(\text {NO}_2\) and \(\text {O}_3\) are considered, particularly for 1-hour \(\text {NO}_2\) and 1- to 24-hour \(\text {O}_3\) forecasts. These findings highlight the superiority of Transformer models and the benefits of incorporating pollutant coexistence effects in air quality forecasting.