Kirk called Dr. McCoy "Bones" because Gene Rodenberry pitched "Star Trek" as "Wagon Train" to the stars, and gave the Dr. character the nickname “Bones” from the beginning. As previous answers have noted, “Bones” was a common nickname for a doctor in our culture at least since the Civil War, and would have been used in radio shows, movies, and TV shows, so easily understood and accepted by a general audience in the ‘60s.
This is specifically stated in Rodenberry’s original Series Format: "THE FORMAT is "Wagon Train to the Stars." Later in that document, in describing the U.S.S. Enterprise: "As with "Gunsmoke" 's Dodge City, "Kildare" 's Blair General Hospital, our Cruiser is a complete and highly varied community; . . ."
And finally, "Ship's Doctor. Philip Boyce, M.D. is a highly unlikely space traveler. . . . Captain April's only real confidant, "Bones" Boyce considers himself the only realist aboard . . . ."
Source: “The Making of Star Trek,” Stephen E. Whitfield, Gene Rodenberry, 1968, Ballantine Books, New York. It has been reissued many times. I bought my copy in 1973, and highly recommend it. It was written real-time, so is not distorted by people’s selective memories. And it’s hilarious. The Vulcan names memos still make me laugh out loud.
It’s been a while since I read it cover to cover, but I don’t recall any reason(s) ever being given in the backstory for Kirk to call McCoy “Bones.”