Air is poor conductor of heat due to presence of nitrogen and oxygen in majority but some gases like CO2 and methane absorb heat energy which warm the atmosphere.
Air transfer heat energy from sun by the by the process of convection. It is the process of transfer of heat through the movement of a fluid like water or air. This process occurs in liquids and gases because they move freely.