Kanji is used most of the time, whenever its possible to use it. The only reason to don't use kanji is if there is some limitation in doing so:
1) Aesthetics purposes: This is the primary reason for japanese natives, and it comes naturally (you don't think of it explicitly). There is an implicit "ratio" on how much kanji would it be "too much" -i.e. it would look ugly, or make your eyes or head hurt if reading for a long time-. So most of connecting words, particles and adverbs ended up being written more often in kana than kanji. For example: たくさんvs沢山 , もっともvs最も , いつ・どこ・なぜ・するvs何時・何処・何故・為る, -ら・などvs-等・等. Even particles have kanji, の・まで・だけ・とも・ながら vs 乃・迄・丈・共・乍ら. And they are all used, it depends on the author and its aesthetics criteria. You can find もちろんとも or 勿論とも, but maybe 勿論共 its "too much". Every one has its own "ratio of kanji-kana". Nouns and compounds are mostly kept on kanji, while every else, if possible, in kana.
2) Technical limitations. This is what happens on early systems who couldn't display kanji by either space or resolution limitations.
3) Target: If the target audience is younger, you tend to use kana versions of only very known words. Complex words, however, mostly need to be kept in kanji to understand its meaning. Better than writing in kana, furigana is used to aid reading (a staple on shounen-targeted media).
3) "日ほん or に本". No, please, no. That's horrible and shouldn't be done. It happens however on some games that doesn't have all the kanji data, but it's painfully to read and to understand. に本 is 2本 rather than 日本. Thumb rule, you don't split a single word in kanji and kana. What you can do, however, is split suffixes and prefixes, for example 彼ら (vs 彼等) , 日本じん (vs日本人) and だい統領 (vs大統領), 友人たち vs 友人達.
子ども can be found very often, this is splitting a single word but it comes by reason (3) (aimed towards children who doesn't know 供 yet) or (2) if it's inside games, or because 供 is ateji and somehow it's "permitted". In papers, news, literature and the like 子供 is more common, but in educational material for example, it is 子ども. *ateji is another case when kana used more often: クラブ/倶楽部, タバコ/煙草, てんぷら/天麩羅, ページ/頁, ビール/麦酒, ロマン/浪漫.