Can you drink flavored water when on a diet?

Sure. Flavored water basically has no calories but serves as entertainment for your mouth. If it does have calories (look at the label) then it can contribute to your overall caloric intake. But even if it does have calories, the caloric content is usully low and won't be a major calorie-contributor to your diet.