In America in the early 1900s, the Force Food Company held a competition to find a name for the energetic young character they needed to promote a breakfast cereal in their adverts. A schoolgirl named Ficken won with the suggestion 'Sunny Jim' which seemed to convey the bright, happy image the company wanted.
It also sometimes took the form Sonny Jim as a general name for any young lad.