Shutting of the main water supply when you are out of town is a good idea if it makes you feel more comfortable about leaving. It is simply added insurance that you won’t have a major water problem when you come home. But you should really gauge that decision on how long you are going to be out of town. If you are going away from more than a week, that is a good rule of thumb for shutting off the main water supply.
If you have a water heater, there is no need to shut it off or drain the water. It is the best practice that you turn the temperature gauge to the vacation mode when you are out of town. All of these things come down to how much precaution you want to take when you are away from your home. Again, for most homeowners this is an issue of comfort, so if you do or don’t decide to shut the water off, the decision is totally up to you.