It really depends on the pistol.
If its a Umarex type CO2, 6yds is all you'll be able to shoot with anything approaching accuracy.
If its a mid-tier springer (Hatsan 25, Webley Overlever etc) then good groups at 10yds are your aim.
If it's top-tier springer (HW45), PCP or CO2 single shot (2240, Benjamin EB) then 20yds is about right.

There's no point trying to zero a gun at 20yds if it's not capable of shooting accurately at that distance - you'll just get frustrated.