The importance depends on where you are going and the general safety of the drinking water. In many places you should drink only bottled water from unopened bottles. Avoid ice cubes. Eat fruit that you peel yourself. Wash your hands frequently (bring Purelle or the like).
When we’ve travelled to exotic locations with questionable drinking water we’ve taken dukeral (sp?) which is a bit pricey but seemed to help avoid travellers diarrhea. You take two doses some weeks in advance. It should be available at your local pharmacy, and comes in packets to mix in water and drink. Tastes awful...
My spouse spent a few months serving in northern Pakistan in the late 89s and was afflicted by frequent gastro issues (as were all of her colleagues), as well as a more serious bout with dysentery that resulted in early repatriation. Also malaria, which stays in the system forever.
Make sure your shots are up to date and see if there are any you should get specifically for the area you are visiting (I have to get rabies and Japanese encephalitis for an upcoming trip), particularly consider hepatitis A and B if you don’t already have them.
See if your doctor will prescribe an antibiotic to have on hand in case you pick up a bug in spite of precautions.
Good luck and enjoy the trip!