'Ello their, ducky
Ducky has been used since the 1500s as a term of endearment. It's used in the same was as dear, darling, pet (UK), or honey (US). In my experience it is not used when talking to your husband/wife, but rather your kids or more likely, used by your great aunt when she is talking to you. It is also much more common in the UK than in America.
This usage probably comes from the English word duck, a ducky being another term for a duckling. It is also possible that it comes from the Middle Dutch Docke, meaning 'doll'.
Around this same time (around 1536), Henry VIII sent a letter to Anne Boleyn telling her that she was the one "whose pritty duckys I trust shortly to kysse." In this case he was using it to mean 'breasts', which was apparently not uncommon back then. This meaning has fallen completely out of usage.
Everything's just ducky!
It's not clear where the usage of ducky to mean 'fine' or 'excellent' came from, but is probably related to the former usage of ducky as a term of endearment. This usage appeared in the late 1800s, and has been with us ever since. This is the second most common American usage, the first being...
All this time, through all these changes, ducky has also meant a baby duck. In this sense ducky is often spelled 'duckie', as in Sesame Street's rubber duckie. This usage is generally considered childish or cutsie, since all the grownup pendants know that baby ducks are properly called ducklings.