Today, the phrase "in the pink" means "in good health" -- but this has not always been the case.

The phrase originally came out of the English fox hunting tradition where a rider was not granted the right to don the scarlet colored jackets, called "pinks", until he demonstrated superior horsemanship and service to the hunt.
Being “in the pink” meant the rider had reached the pinnacle of achievement or status in the hunt.
The use of the phrase “in the pink” evolved to be used more broadly to mean "the very pinnacle of" something, but not necessarily the hunt during the 18th century.
This meaning of the phrase is seen in literature beginning in the mid-1700s and continuing throughout the 19th century. It isn’t until the early 20th century that we see the phrase being used with its current associations.
It is unclear how it transitioned into a phrase that is now specifically health-related, but possibly, as it came into use among those not familiar with the hunt, it was thought that “pink” referred to the rosy glow of the complexion that is indicative of good health.
In researching this phrase, I was especially interested in delving a bit deeper into learning why scarlet was the color of the jackets worn in the hunt. I found this explanation: