 The gravitational pull on the closer half is stronger, since gravity decreases with the square of distance, so this creates a small torque on the Earth as the Sun pulls harder on one side of the Earth than the other.The axis of this torque is roughly perpendicular to the axis of the Earth's rotation so the axis of rotation precesses.If the Earth was a perfect sphere, there would be no precession.