Besides all the factors already mentioned, always keep practical travel distance in mind. Your average medieval people will settle just far enough from others to not bother each other but to be able to reach neighboring, friendly settlements conveniently if they want to trade, help, defend, escape to, and so on. Villages won't be too far from cities, forts, castles, etc, so that they can be protected and reached by the fortification's forces and so that they don't have to spend too much time on the road. Sure, villages will form chains. (You start from an outlying one, arrive with your cart in the next one closer to the city just in time to spend the night in an inn and maybe peddle your wares and be able to go home next morning, if you don't want to continue your journey into the city.) But after a few links, where the protection of the city will get too weak (its forces becoming too distant to deter attacks), expansion will either cease or a new power center -- a guard tower, a small fort, etc -- will emerge, forming a spiderweb of civilization.
Of course, in worlds where you have magic things get fluid. If the indestructible and clairvoyant flying guardian iron golems of the King can reach any village in an hour in a 300 mile radius area around the Capital, and if trading can be done via portal chests, villages will feel safer, and they will be farther apart from one another.
Also, worlds where you have races other than humans will have different stuff. Surface dwarven villages will probably a bit closer to each other, because their walking speed is slower. Sure, they may not be slowed by encumbrance so much as a human, but nighttime in the wild / on the road can be equally dangerous.
And so on. Consider the above factors also (besides all the others mentioned by other users) when creating a believable setting.