It's because of historical sound change. A bit long story, so bear with me.
はひふへほ, or what is called the "ha" row today, originally represented the /p/ sound, i.e. pa, pi, pu, pe, po.
One piece of evidence is in the arrangement of 五十音図, which was modeled on the Sanskrit syllabary: a (vowel) -> ka (glottal) -> sa, ta, na (dental) -> pa, ma (labial) -> ya, ra, wa (liquid).
But the bilabial plosive /p/ began the process of becoming bilabial fricative /ɸ/ from very early on. By the time the Japanese-Portuguese Dictionary was published (ca. 1600), it was complete, and the Portuguese transcribed はひふへほ as fa, fi, fu, fe, fo.
(The /p/ sound was only retained in a "doubled" position, e.g. りっは (rippa). European missionaries found this unsatisfactory, so they invented the so-called 半濁点 or maru mark, and the Japanese people happily accepted it and 'rippa' is written りっぱ now.)
And this bilabial fricative /ɸ/ continued to change. At the beginning of words, it became ha, hi, fu, he, ho; in other positions, wa, i, u, e, o. For example, はる = haru, ふむ = fumu, but いふ = iu, いはない = iwanai, いひます = iimasu, いへる = ieru.
Japanese being an agglutinative language, particles are considered part of the word they follow. Naturally the particles は, へ have come to be pronounced 'wa' and 'e' respectively.
It's all a bit confusing, so during the
Japanese script reform it was decided that words should be spelled as pronounced, i.e. いう, いわない, いいます, いえる.
But exceptions have been made for three particles, because they are just too essential to the Japanese Language. The topic marker 'wa' retains its historical spelling は instead of わ; the direction marker 'e' continues to be written へ instead of え; the object marker 'o' is を instead of お.
(I believe I've read somewhere that there was supposed to be a grace period, but it got indefinitely prolonged. So here we are, 'konnichiwa' is still spelled こんにちは because that は is a particle in the elliptical phrase 今日は…)
So to answer your question. は is read like 'wa' only when it acts as a particle, e.g. in "Watashi-wa Nakamura desu."