Common reasons for insulating pipes are to improve efficiency and to avoid freezing or condensation on the outside of pipes. Your reason for deciding where and how to insulate your pipes will depend on the situation. Like most functional home improvements, the goal will be to address the cause, not just manage the symptoms.
With energy efficiency in mind, pipe insulation is straightforward. This is because the majority of water heating energy loss is tied to storage, not distribution. Focusing on the first 3-6 feet of both your hot and cold water pipes starting at your water heater will meaningfully reduce your tank’s standby heat losses.
Condensation on the outside of pipes is generally a summertime issue. This happens when enough water vapor in the air results in condensation on the outside of a relatively cooler water pipe. Ideally in this situation, the source of excess moisture in the air would be investigated and resolved. Otherwise, installing well-sealed common foam insulation to prohibit air contact with the pipe will resolve a condensation problem.
Avoiding locating pipes in spaces that could get cold enough to freeze is ideal, yet sometimes we find ourselves in less than ideal circumstances. In this case, in addition to pipe insulation, heat tapes come in handy. The combination of the two increases the efficiency of the heat tape and should eliminate the possibility of future freezing.