Your dog's coat performs much the same function as your clothes. His coat protects him from the sun's UV rays and the rain. It helps keep him cool in the summer and warm in the winter. Not only will shaving your dog's hair down to his skin make it tough for him to stay warm, it will leave his skin vulnerable to sunburn in the summer. Without his coat, your dog will also not be able to stay cool in the summer and he could easily end up with sunstroke or heat exhaustion. Be sure to check with your vet to make sure you really need to shave your pup and for a supply of canine sunblock.
Your dog needs his coat, but if for any reason you feel the need to shave your pooch, you need to spend some time with him, giving him time to get used to the clippers before you start shaving. The more time you can spend doing this and working to keep him calm, the easier it should go for both of you.
Shaving your dog is a moderately challenging task, not just for you, but for your dog as well. It is not something you should do just because you feel like it. This is because it leaves the skin open to sunburn and your dog without any protection from the heat and cold. If your dog is suffering from parasites or a health condition though, shaving may be a necessary part of treatment.