Bradford on Avon is a gorgeous place. From what I've heard there seems to be a good community spirit. But it is pricey, and for all but very basic shopping you'd be going elsewhere.
Corsham is good (lovely deli, bread shop, health food shop!), but no train line (although signs are looking good for the station to be re-opened in the near future).
Devizes OK, don't know about schools.
Melksham not great, Calne absolutely awful.
Chippenham is a good all-round solution. House prices not too bad, and lots of choice re housing. Schools good, secondary schools excellent. Great train links to both Bath and Bristol. Great for families.
You're looking at the right area though, the south-west is great!
Malmesbury is supposed to be good for families, but don't know it well myself.
Bath is great but pricey and depends if you want city life.
Marlborough - nice to visit, but traffic is horrendous and I don't think there's a station?