Listen to the audio file for "Konnichiwa."
There is a rule for writing hiragana "wa" and "ha." When "wa" is used as a particle, it is written in hiragana as "ha." "Konnichiwa" is now a fixed greeting. However, in the old days it was a part of sentence such as "Today is ~ (Konnichi wa ~)" and "wa" functioned as a particle. That's why it is still written in hiragana as "ha."