Dog muzzles are used for a wide range of situations with your dog, it could be simply that your pet does not enjoy visiting the vet and it is easier to have your dog muzzled to stop the chance of any problems - either with the vet or with other pets at the vet.
For some dogs muzzles can be useful to help train them to be less aggressive to other dogs - in situation such as this it is advisable to consult with your vet first or to work with a pet behaviourist to reduce or remove the dogs aggressive behaviour. While books can help you may find that working with a dog trainer is the best answer (as well as reading books on dog training and behaviour).
I always tend to think that dog muzzles make your dog more aggressive looking and where possible try and train your dog not to have the problems that require them to wear a dog muzzle. To be honest we have used dog muzzles on a few occasions and in the end patience and training was required to stop our dog from being aggressive to other dogs when on walks. However I still keep one of my dogs on a lead who has had aggression issues with other dogs in the past, just to be sure that she will not hurt or cause other problems. Tibby (our collie) is very happy to go on walks on her long retractable dog lead, and when we are away from other dog walkers she is then left off to run about with Charlie (yet another collie) who is always well behaved.