How much orbital deviation is required for the Earth to get knocked out from current orbit so it either moves away from Sun or towards the Sun?
An orbit isn't a fragile balance, where some small deviation can knock an object out of orbit. For an object at a given distance from a central body (the sun for the Earth, the Earth for an Earth satellite), any velocity less than the escape velocity results in an elliptical orbit...Earth won't spiral in or out because it's moving too slow or fast. If the disturbance does not push the velocity above escape velocity, it will only deform the orbit into a different ellipse.
If the resulting velocity is very low, closest approach will be beneath the surface of the central body...it will impact. You need a change of nearly 30 km/s to hit the sun from Earth. If escape velocity is reached or exceeded, the closed elliptical orbit will change to an open parabolic or hyperbolic trajectory, with the object escaping. This is much easier, requiring about 12 km/s from Earth in the direction of Earth's motion, solar escape velocity at Earth's distance being 42.1 km/s.