Venus and Mars have atmospheres made mostly of CO2. Venus has a huge greenhouse effect. Why doesn't Mars?
Venus's atmosphere is much thicker than Mars's atmosphere, so it is able to absorb more solar radiation and keep less heat from escaping into space. Mars, on the other hand, has such a pathetic little atmosphere that it just cannot absorb much heat from the sun, nor can it hold onto what little heat it does absorb.