Why are simple kanji sometimes written in hiragana?


I was playing a game and a little boy said, おにいさん. I was wondering why it was
written in hiragana? Is it because the boy wasn't my brother, so putting it in
hiragana changes the meaning?




No, there is no such rule that お兄さん and おにいさん refer to different things.

Usually, there is no strong reason to write this word with kanji or in all-
hiragana. Both お兄さん and おにいさん are perfectly natural ways to write this word,
and there is little difference. See: [Why is 私 a sixth grade
kanji?](https://japanese.stackexchange.com/q/62132/5010)

However, all hiragana words can sometimes give a slightly _mild_ , _friendly_
or _childlike_ impression. If the speaker is a friendly little boy, this fact
may increase the likelihood of おにいさん a bit. See: [What does it mean for the
'feel' of a sentence / text when it's written in all
hiragana?](https://japanese.stackexchange.com/q/15108/5010) and [Why is the
place's official name written as "なら工藝館" (rather than
"奈良工藝館")?](https://japanese.stackexchange.com/q/35785/5010).

