I live in Izmir and have traveled to Istanbul many times. Tap water throughout Turkey, including major cities, is a godsend. It is not guaranteed kill You, but generally it does not taste that good and drinking is always considered a bad idea. Most cities try to treat it as safe, but that does not make it good water.
The local custom is to drink bottled water. Water is always available on the street, and for the home, 20-liter water jugs are usually delivered within minutes of ordering for 3-6 lira. Keep these bottles ready for drinking.
In most places you can cook / wash with tap water, but if your location tastes particularly bad, you may even prefer to cook with bottled water.
To edit: Water supply systems in big cities are not monolithic, there is usually no right answer. In Izmir, the water in my house is drinkable, but in an office I am often in such a rank that we do not even use it for dishes or for washing hands.
Istanbul, in particular, spans two continents, You should ask people in your district about water quality and generally do what they do. If your hosts wash the vegetables with tap water, it's probably fine. It's always nice to play it one step later than the locals travel, but if they do not say it, be sure to stop!