At night we are not in the direct path of sunlight, but the Earth's atmosphere does a wonderful job of trapping in heat from the Sun so that even the night-side of the Earth feels some heat. If you were on the Moon where there is no atmosphere, you would feel a huge difference in temperature between the day-side and night-side, since the heat on the day-side is not "trapped". So you can thank our atmosphere for keeping us warm!
Holly