Air in the earth mainly consists of oxygen and nitrogen, besides, there is some other substances like moisture, dust and others. Air mass density is large in the earth, which means per cubic meter contains more molecules in the earths air than in any other places.
Comparatively speaking, air density on the Mars is much lower than that of the earth. In addtition, the elements of the Mars are different from those of the earths. the former contains carbon dioxide, nitrogen, argon and others, the most important of which is that Mars contains minute dust particles which are smaller than those of on the earth, while the number of such particle on the Mars is more than that on the earth, which plays a key role in forming the different color of sunset of the Mars and the earth.
As is known to all, sunlight has different wave lengths, so when it passes through the Mars air with large quantities of dust particles, it will be divided into many colors, too. While the dust particles of the Mars are with appropriate size, which can make them can absorb both the blue wave length of ray of light and can scatter red wave length into the sky. Thus, when the Mars witnesses its sunset, the sky will turn red and pink, the redness has been scattered into the sky, so the remaining of the sunlight is the colors that have not been scattered, among them blue color remains to be the most prominent. This is why we can see blue color when standing on the Mars to see the sunset, as the same time, the surrounding of the sun appears redness, which is just opposite to what we have seen from the earth. In the earth, when sunlight encounters the air, because of blue color being the scattered color, when it is sunset, we can see that the sky far away from the sun is still azure.