a) The kid is cute.
b) He/She reminds you of your childhood days.
c) You're just used to smiling when seeing a kid.
d) The parent/guardian looks at you, and you're forced to smile.
e) The kid looks at you, you want to give him/her a good impression.
f) Everybody does it! It's a natural law.
Thank you for your answers. Please add something else if you wish.
Happy Children's Day!