Water quality may vary widely in different cities and trains. Your best bet is to drink and brush your teeth only with bottled water which is usually of good quality. Be careful to avoid ice, raw food and vegetables.