Brian Epstein had asked the Beatles (principally) John and/or Paul to write a song for one his "stable" of performers, Billy J. Kramer. This happened in early 1963 and the song itself was probably written late April/ early May 1963. The song was professionally recorded by Kramer in late June of 1963 and eventually achieved the number one spot in the charts.
"Bad To Me" was the song given away. This Lennon/McCartney tune was written mainly by John but the verses sounds (to me, anyway) very McCartneyesque.
A demo of the song from an acetate given to Dick James and later sold at auction by his Alister Taylor has appeared on various bootlegs. The demo contains a performance by John and Paul on acoustic guitars and both sing on the demo. The demo was probably recorded between mid-May and early-June. The demo also has a bit of a different arrangement than the official Kramer release.
The demo can be found on both "Not For Sale" and "File Under:Beatles" on LP. It can also be found on CD under the titles "Vinyl To The Core" and "Acetates".