What is the context for calling someone "bones"
Bones in this context is derived from sawbones, slang for a physician or surgeon.
Before anaesthetics (and antibiotics) were invented, surgery was often rudimentary for fairly obvious reasons. The reputation of a surgeon tended to be based on how quickly he could perform an amputation (I say "he" advisedly since there were no female surgeons at the time.) This involved little more than making the patient as drunk as possible to dull the pain, getting several assistants to hold him (or her) down, and then sawing through the affected limb as quickly as possible to minimise the agony caused. Robert Liston, a noted Victorian surgeon, was said to be able to amputate a leg in two and a half minutes, and once removed a limb in 28 seconds.
For this reason, as has already been said, surgeons and doctors were often called sawbones, and a good one was quick as well as accurate. Doctors were also known as quacks, but this term would have been a gross insult to any surgeon.
Wikipedia: Robert Liston
Actually in the first Star Trek that Abrahms directed, Kirk asked McCoy that question.. his answer was that he had gotten divorced and all he got were the left over "bones" of their marriage. The name stuck.