I think the answer to the question of distance also depends on the ability of the firearm.
I carry a .38 snub-nose revolver myself, and I tend to find that it's most accurate at no further than 7 yds, although I still manage to keep things in the Center Of Mass from 25 yds.
As much as I'd like to say that contact distance to 7 yds. is enough for defensive practice, the truth is you never know what circumstances you might entail in a fight for your life.
In that case, I'd say practice to as far a range as your weapon will allow. The key word in all of this is: PRACTICE, PRACTICE, PRACTICE!!!!!
A good defensive pistol course is also a good idea in my opinion, as you not only want to hit the target from your standard stance at a standard range, you want to be able to make your shot count under stress from a variety of possible situations.
Your results may vary,
Sure, you can have my gun...BULLETS FIRST!
"People sleep peacefully in their beds at night only because rough men and women stand ready to do violence on their behalf." -A token of appreciation for the good cops.
"Good cheer and steady aim are always fashionable."
"Will...if need be!"