The dust in Mars’ atmosphere scatters red, while the major gasses in Earth’s atmosphere (Nitrogen and Oxygen) scatter blue light. Longer wavelengths of light, like red, will bounce off (scatter) larger particles like dust, while shorter wavelengths, like blue light, will bounce of smaller particles, like the molecules of gas in the atmosphere. The phenomena is called Rayleigh scattering, and is different from the mechanism where different molecules absorb different wavelengths of light.
Ezra Block and Robert Krulwich go into details on NPR.