Kanji can always be replaced with hiragana, for example
- if the writer cannot recall the correct kanji, or
- the intended reader is likely to have a limited knowledge of kanji (eg children), or
- the kanji for the word is not in general use, or
- pretty much any reason you want.
The use of katakana, however, is usually reserved for borrow words, emphasis and so on.
So writing using only hiragana is both valid and understandable, with the caveat that in many cases doing so will make your writing very awkward reading, and can introduce ambiguity into your writing, for example in the case of homophones (words that share the same pronunciation but generally different kanji).
Compare the following two ways of writing the same well-known sentence:
I think all Japanese speakers would agree that the kanji version is much easier reading and much clearer than the hiragana-only version.
Writing using only katakana will be more awkward to read because it is not generally expected for Japanese words to be written in katakana, and for the same reason would probably be considered invalid, except in certain circumstances like to put emphases on pronunciation. If you did decide to write this way for some reason, however, it would be just as understandable as writing in only hiragana as the two characters sets have a one-to-one relationship.