The earth revolves around the sun in elliptical orbit with the sun at one of the two focii of the elliptical orbit. Therefore, moment of inertia of the earth about an axis through the sun keeps on changing due to change in its distance from the sun.
Since, no external torque acts on the earth, its angular momentum (Iω) must remains constant. So, angular velocity of the earth increases, when moment of inertia of the earth decrease and vice- versa.