A child regards your cheery smile as evidence that you are on his side, so he relaxes and is happier.