Sean has the right idea.
First you need a solid basis in the fundamentals of marksmanship -- grip, trigger control, sight picture, follow-through -- so you can shoot accurately. What range you use to establish and maintain those elements really isn't all that important. If you can keep every shot in the 9 or 10 rings of whatever target you're using for that kind of drill, then back it up a bit and challenge yourself to do it at longer range. This is merely establishing the very basics -- the simplest building blocks upon which your practical skill set will be constructed.
If you were practicing for basic marksmanship, to compete in a bulls-eye match for example, that's all you need to worry about.
But you've indicated that your concern is defensive shooting. Whole 'nother ballgame. For that you must move beyond basic marksmanship practice and into how to USE the gun as a tool to solve "practical" shooting problems. Picking a distance at which you will practice all your shots is kind of the antithesis of that.
In practical scenarios, your shots may be anywhere from contact distance, fired from a gun-retention position, out to 15-25 yds. You have to know instinctively how to take any shot that presents itself.
Defensive shooting means that someone is shooting at (or otherwise attempting to harm) YOU. So, defensive shooting is, by necessity, a balance of accuracy -vs.- time.
You need to practice how to take the quickest accurate shot you can, or said more precisely, the fastest shot you can take and still make an effective hit -- at whatever distance a shot presents itself.
That means you should be practicing hammering multiple good hits on 3-5 yd. targets at a rate of about 4-5 shots a second, requiring the very briefest flash sight picture for each shot.
And also practicing how/when to take a slightly better sight picture and make the same good hits at 7-10 yds. with a slight reduction in that speed.
And then, teaching yourself how much time you must take to "dress" your sight picture to make just as good hits at 15-20 yds.
With practice, you'll stop looking at this as, "I can shoot all my shots into 2" at 7 yds, and into 4" at 15 yds, and into 6" at 20 yds..." and move into the mindset of "I can put two hits into the center-of-mass at 5 yds in one second, drawing from the holster. I need to slow down to 1.5 sec. to make those same hits at 15 yds, and I should really drop back to 2 seconds or so to keep my hits effective at 20 yds."
If you're trying to shoot an attacker at 20 yds when your practice and skill set is limited to closer distances, you're going to miss.
If you're trying to shoot an attacker at 5 yds, and your practice is geared to chewing the centers out of bullseyes at 20 yds, you're going to die before you get off a shot.
So trying to pick a distance at which you should practice is kind of backwards. You need it all.
...
As an aside:
Once you start to get that way of looking at shooting skills, consider the other factors that would attend any defensive shooting situation. You (hopefully) won't just be standing still like a bullet magnet while you're shooting. So you should be practicing moving out of the way while you fire. (Moving off the "line of force.") But your adversary won't be standing still either. Can you make hits on a moving target? Many home defense scenarios involve hunkering down to observe an intruder and using your defensive position wisely. So, you probably need to be practicing shooting around cover. How quickly can you relaod if your gun goes empty? Do you leave the lights on 24/7? Might want to practice manipulating a flashlight and a gun at the same time. Now, what if your gun jams? Can you clear a malfunction quickly enough not to be out of the game? ... and on, and on.
A good defensive shooting instructor can teach you what you should be practicing on your own.