The best explanation for why Mars' and Venus' surface temperatures vary, despite both planets having atmospheres that contain mostly carbon dioxide, is:
Mars has a thin atmosphere that cannot hold much heat.
Venus has a thick atmosphere that traps heat very effectively, leading to extremely high surface temperatures, while the thin atmosphere of Mars is not capable of retaining heat, resulting in much colder surface temperatures.