In fact, in July the Earth is farthest from the sun while in January it is closet to the sun.
During summer, the sunrays strikes the Earth at a steep angle. The light doesn't spread much results in increasing amount of energy striking any particular spot. The long daylight hours grants the Earth plenty of time to reach warm temperatures.
While during winter, the sunrays strikes the Earth at a shallow angle. These rays spread out in great angle maximizing the amount of energy that hit any given spot. And the long nights and short days prevents the Earth from warming up. Thus, we experience cold winters.
Read More at : answers.mindstick.com