Dp grew up in a village just two miles outside a 40,000 population market town. Village has maybe 2,000 residents. Dp adored his childhood. He's an only child, but never felt lonely. Tells many stories of playing with neighbours' kids and school friends out on the village school field, riding bikes up a farm track, camping out in farmers' fields, etc. Loved it.
When he was 13, his parents split up and moved separately to the nearby town. That also worked a treat at the time, as he could walk to the secondary school in 10 minutes, walk to/from the town, train station, etc, at that age when kids crave more independence.
We're now 28, ds is almost two, and we've just moved back to the original village, which has always felt like "home" to dp. He wants ds to have the same kind of childhood he had, and I'm sold on this, even though I'd previously lived only in towns/cities.
School, the village shop and village hall are all a two-minute walk away, we have ready-made neighbours - people dp knows from when he lived here first time around - and, best of all, we found a house that backs on to the same playing field dp played on. With a gate!
It could all change when ds's teens approach, but for now, dp is over the moon, and me and ds are settling in nicely too.
Conclusion, based only on our experience: village for 0-secondary school age, town for teens onwards ... and then back again!