Let me put it this way,
Every body (planets, asteroid, comet, moon) whether having an atmosohere or not has that 'comfort zone'
That temperature range that it mostly oscilliates in
Several factors affect the temperature e.g. distance from the sun, atmosphere thickness and composition, time of...