Many candies began as medicine. Hard candies, especially. Lozenges have long been appreciated for slowly releasing healing herbs with pleasant taste (sugar, lemon or mint). Modern cough drops descend from this tradition.
Food historians confirm horehound was appreciated for its medicinal properties by ancient peoples. The earliest "recipes" were medicines, generally sweetened syrups. The first print reference we find for candy (hardened syrup) are from the 17th century. Perhaps the [hard] candy form evolved as a convenience. Joseph Dommers Vehling's tranlsation of Apicius [1-3rd century AD] contains an glossary item for horehound, but no recipes specifically titled such.
A sampler of early recipes:
[15th century Italy] "Book III, 42. On Horehound Horehound is what the Greeks call prachion because of its bitterness, and it is numbered by them in the first rank of herbs. When its seeds and leaves are ground, they are effective against snakes. They settle pains of the chest or side or coughs. Castor tells of two kinds of horehound, black, which he approves more, and white. From either, when they are chopped fine and mixed with flour, tidbits are made which we eat for health at the first course, after they have been fried in oil in a pan. They are believed to get rid of worms, and for this reason they are often served to children."
---On Right Pleasure and Good Health, Platina [originally published in the 15th century], critical edition and translation by Mary Ella Milham [Medieval & Renaissance Texts & Studies:Tempe AZ] 1998 (p. 205, 207)
[17th century England] For the phthisic.
...take horehound, violet leaves, and hyssop, of ech a good handful, seethe them in water, and put thereto a little saffron, liquorice, and sugar candy; after they have boiled a good while, then strain it into an earthen vessel, and let the sick drink thereov six spoonful at a time morning and evening...
---The English Housewife, Gervase Markham [originally published 1615], edited by Michael R. Best McGill-Queen's University Press:Montreal] 1994, Chapter 1, recipe 88 (p. 23)
[18th century America] 246. To Make Sirrup of Horehound.
Take hore hound, 2 handfulls; coltsfood, one handfull; time, penny royall, & callamint, of each 2 drams; licorish, one ounce & a halfe; figgs & raysons of the sun, of each 2 ounces; anny seeds & fennell seeds, of each a quarter of an ounce. boyle all these in a gallon of faire water till it comes to a pottle or 3 pintes, then strayne it & take 3 pound of sugar & 3 whites of eggs & clarefy with liquor, & soe boyle it to a sirrup.
---Martha Washington's Booke of Cookery, transcribed by Karen Hess [Columbia University Press:New York] 1981, Booke of Sweetmeats, (p. 376)
The earliest print references we find for horehound candy in American cookbooks are from the 19th century:
 Horehound Candy
1/2 ounce dried horehound
1 cup boiling water
1 1/2 cups sugar
1/4 teaspoon cream of tartar
Put water and horehound, which may be procured of a druggist in one-ounce packages, in a saucepan and let stand one minute. Strain through double cheesecloth; these whould be half a cup of liquid. To liquid add sugar and cream of tartar, and stir until mixture boils. Wash down crystals from sides of saucepan with a butter brush dipped in cold water, and boil to 300 degrees F., or until it is very brittle when tried in cold water. Remove at once from the fire, and pour into buttered pan one fourth inch thick, or pour between candy bars. As soon as it cools a little, loosen it from the pan, and mark in small squares. Go over the marks with a knife until candy is cold, then break with the hands. Pack in air-tight jar, and keep in a cool place, or wrap in wax paper.
---The Candy Book, Alice Bradley [Little, Brown:Boston] 1929 (p. 130-131)
Laura Mason, Britsih confectionery history expert, briefly mentions 'horehound taffy' in the late 1890s. She does not offer an exact date/place/person credited for making the first batch. (Sugarplums and Sherbet: The Prehistory of Sweets, Prospect Books:Devon 2004, p. 183)
"Horehound--The bitter extract of horehound...comes from an aromatic plant of the mint family. It is an Old World native now naturalized in North America. Horehound is used in candies, cordials, and cough medicines and has been cultivated since antiquity for other medicinal uses. It is also said to have been employed as a condiment."
---Cambridge World History of Food, Kenneth F. Kiple & Kriemhild Conee Ornelas [Cambridge University Press:Cambridge] 2001, Volume Two (p. 1786-7)
"Horehound, wild plant whose leaves and seeds were used in a medicinal wine effective against coughs and colds. An amphora at the Roman fort at Carpow, Scotland, had contained horehound wine."
---Food in the Ancient World From A to Z, Andrew Dalby [Routledge:London] 2003 (p. 180)
"Horehound, often called white horehound, Marrubium vulgare, a plant native to Mediterranean Europe and C. Asia, and naturalized in N. America. Its leaves make a tea, described by Grieve (1931) as an appetizing and healthful drink, popular in Norfolk and other country districts'. It is also used in candies."
"Marrubium Vulgare L. -Hoarhound...Branched at the base, hoarhound is a clumpy, spreading perennial, reaching a height of about 2 feet, and is covered with a white, felty or wooly pubescence, especially on the stems & underside of the leaves. The leaves are ovate to round, narrowing to the petiole, rugose, crenately toothed, the maximum length 2 inches. The minute white flowers are in whorls in the axils of the upper leaves, the calyx has ten teeth...The plant is bitter-aromatic. An infusion of the leafy tops, fresh or dried, is reputed to be a remedy for indigestion, coughs, colds, & sore throat; it may be sweetened with honey. A candy is made by boiling sugar in a decoction of the leaves & stems. The plant is ornamental and is also attractive to bees. Hoarhound is propagated by division, layers, cuttings, & seeds. It is best adapted to light, calcareous, rather dry soil & full sun. It may be frost-killed in cold winters. Plants should be spaced 12 inches apart. Hoarhound is native in the temperate regions of the Old World & is naturalized throughout a large part of the United States & southern Canada."
---Garden Spice & Wild Pot Herbs, Walter C. Muenscher and Myron A. Rice [Cornell University Press:Ithaca NY] 1955 (p. 97-99)
Why the name?
"Hoarhound, or Horehound: a bush plant of the mint fmaily native to the south of Europe and Eastern countries, growing about a foot high, and with round, wrinkled, almost hairy ("hoary") leaves, which contain a bitter principle and volatile oil of aromatic but not very agreeable smell. It is used as a flavor for candy and also in medicinal syrups for its curative properties for coughs and other affections."