Tail docking for aesthetic purposes is (rightly) illegal but working dogs are exempt.
it must be done by a qualified vet before the pup is 5 days old (bones haven't fused so it's no worse than ear piercing apparently) and the person having it done must show evidence that the pup is destined for a life of work, normally this takes the form of a letter from a gamekeeper stating that the said person regularly works on his shoot or from an employer who uses the person for pest control involving the dogs. A valid shotgun or firearm licence is also acceptable proof.
I have spaniels which are all docked, I use them for shooting and tail injuries on in docked dogs can be horrific. I have seen undocked dogs work and get injured tails. It's not nice, lots of blood, infections, repeated vets visits, pumping the poor things full of antibiotics and constantly re dressing their bleeding tails. It's just awful and is so easily avoided.
Many dogs (including mine) also have their dew claws removed at the same time (the dew claw is a redundant toe a few inches up the leg a bit like a thumb but up above the joint), I've seen them get ripped off and Christ it is horrible. Again, 2 seconds work with minimal pain when the dog is born avoids a whole load of suffering later on.
Scotland used to have a total ban on docking / dew clawing and have just introduced the working dog exemption to come into line with England and Wales after an awful lot of scientific research, evidence from vets etc.
They only brought in the ban after the left wing bods in power up their thought it would be a good way to stick it to the 'posh' shooting community and bugger the poor animals.