Fine particulate matter (PM2.5) poses a significant public health risk due to its association with respiratory and cardiovascular diseases. Given the limited availability of PM2.5 monitoring stations, there is a pressing need for reliable real-time forecasting models. This study introduces TSPPM25, a novel Transformer-based model designed for spatiotemporal prediction of PM2.5 levels. TSPPM25 leverages multiple data embedding techniques and various attention layers to effectively capture the intricate spatiotemporal relationships in multivariate data. The model's performance is evaluated using a California Aerosol Optical Depth PM2.5 dataset and compared with several baseline models, including LSTM, Bi-LSTM, Linear Regression, and basic heuristics models. The results demonstrate that TSPPM25 exhibits superior spatiotemporal learning capabilities, robustness, and stability, outperforming other models across MSE, MAE, and SMAPE metrics. Furthermore, the study explores the underlying patterns in PM2.5 data through harmonic analysis, revealing that TSPPM25 performs exceptionally well even in complex scenarios characterized by mixed wave patterns. Conclusively, TSPPM25 emerges as a valuable tool for predicting PM2.5 levels demonstrating its efficacy in the California region, and thereby contributing significantly to the field of air quality forecasting.