Heat transfer is the exchange of thermal energy between physical systems, depending on the temperature, by dissipating heat. The fundamental modes of heat transfer are conduction, convection, and radiation.
Since there is no material medium between the sun and earth, so heat transfer takes place through radiation.