Answer:
The sun heats the earth through radiation. Since there is no medium in space, radiation is the primary way that heat travels in space. This heat transfer is called conduction