Acid rain occurs mainly due to the formation of mineral acids like Sulphuric acid, and Nitric acid due to the reaction between rainwater and respective oxides of these nonmetals.
As these oxides are present in the atmosphere, where these oxides react with water, oxygen, and other chemicals to form more acidic pollutants, known as acid rain.
The oxides of Sulphur and Nitrogen are present in the atmosphere due to the burning of Sulphur and the internal combustion of vehicles.