I usually hug and kiss my best friends children without any problem, but they are really close friends, like family. Usually it's considered normal doing this with babies (0-2 years), but people may look you badly if you do the same with grown ups. Regarding children that are not very close to you or your family, the general advice it's to keep some distance. The reason is this collective paranoia as Eliot correctly explained. I also think that in big cities this is more marked than in small towns where everyone knows each other.