Quoted By:
>The flame on its tail indicates Charmander's life force. If it is healthy, the flame burns brightly.
>If it's healthy, the flame on the tip of its tail will burn vigorously, even if it gets a bit wet.
>The flame on its tail indicates Charmander's life force. If it is healthy, the flame burns brightly.
So according to the Pokedex, it isn't a literal flame on its tail, but a physical representation of the Charmander/Charmeleon/Charizard's life force. We can assume it function's like Ponyta's fire mane in the anime - though not actual fire, it can still be used to burn things if the Pokemon wants it to; however, the flame won't simply be extinguished by water. This is why we see Charizard survive being completely submerged - the Charizard won't die if the flame goes out, but rather the flame will go out if the Charizard dies, and it's intensity is directly affected by its physical and mental health.
Also, simply being in water isn't the same as being hit by a water attack - otherwise, Rain Dance would do damage to fire, steel, and rock based pokemon, and you'd be finding dead 'mons all over the place whenever a passing storm blows by, neither of which actually happens.
Tldr; submerging a Charmander or Charizard is relatively harmless so long as it doesn't drown, because it isn't being hit by a water attack and the tail flame isn't an actual flame - just a visual representation of its health.