Mars is, on average, about half as far again from the Sun as the Earth is. However, as has been mentioned, its distance from the Sun varies considerably (by about 20%) during its two year orbit. The Earth�s distance in orbit, by comparison, varies by less than 3%.
However, the wide variations in Martian surface temperatures (about 160 degrees C) are not solely attributable to this variation. In fact the temperature on any given part of the planet�s surface varies by only about 30 degrees due to the varying distance from the Sun. The remaining variances occur because Mars has virtually no atmosphere and no oceans. This also means that temperatures on the planet's surface are unstable and it is not unusual for them to vary by dozens of degrees in just a few minutes.
On the Earth the atmosphere and the oceans act to stabilise the temperature, effectively absorbing, storing and gradually distributing heat from the Sun between night and day and, to a lesser degree, summer and winter. Without this effect surface temperature on the Earth during daytime would rise to oven-like temperatures and rapidly plunge to ultra freezing levels at nightfall.