For any thermoelectric effects to be achieved, a thermoelectric material must have hot and cold sides. Typically, the hot side can be easily obtained by excess heat. However, the passive cooling method is often limited to convective heat transfer to the surroundings. Since thermoelectric voltage is proportional to the temperature difference between the hot and cold sides, efficient passive cooling to increase the temperature gradient is of critical importance. Here, we report simultaneous harvesting of radiative cooling at the top and solar heating at the bottom to enhance the temperature gradient for a transverse thermoelectric effect which generates thermoelectric voltage perpendicular to the temperature gradient. We demonstrate this concept by using the spin Seebeck effect and confirm that the spin Seebeck device shows the highest thermoelectric voltage when both radiative cooling and solar heating are utilized. Furthermore, the device generates thermoelectric voltage even at night through radiative cooling which enables continuous energy harvesting throughout a day. Planar geometry and scalable fabrication process are advantageous for energy harvesting applications.