It's 100% just coincidence. There's no plausible way in which these two facts could possibly be causally related.
The temperature of the Sun isn't in any way influenced by the transmission spectrum of water, since water molecules do not exist inside the Sun (it's too hot for them to be stable); and, vice versa, the transmission spectrum of water could hardly be affected by the temperature of but one star in the cosmos, even if it does happen to be the nearest one.
One answer mentions the possibility of anthropic bias. The claim here is that (1) a match between these two frequency ranges is needed for eyes to evolve; and (2) eyes are needed for intelligent life to evolve; hence we could only have evolved on a planet where these two frequency ranges match closely.
However, neither (1) nor (2) is convincing. Red and blue stars give out plenty of light in the visible spectrum (else you wouldn't be able to see them in the night sky), so there's no reason to think eyes couldn't exist on a planet orbiting such a star, and that's without even considering that they might be made of some other substance that is transparent at the star's peak frequency range. Even if eyes were impossible on such a planet, it's hardly difficult to imagine an intelligent species that relies on other senses instead.
The only other way these two facts could be related is if the temperature of the Sun and the transmission spectrum of water share a common cause. But there are in fact other stars at different temperatures, so we can immediately rule that out.
Having eliminated all the ways in which these two facts could be causally related, we have to conclude that they aren't related at all; it's just a coincidence.