What is the origin of the use of the word "card" to refer to an eccentric person? How did this meaning develop?
The earliest recorded use of card in this sense was in an 1836 work by Dickens (Sketches By Boz) in which he referred to someone as "a knowing card" ("Mr. Thomas Potter whose great aim it was to be considered as a 'knowing card'".) He used it again in Bleak House in 1852: “Such an old card has this; so deep, so sly, and secret.” This usage sprang from cards in the sense of playing cards, which had long used such phrases as a sure card, a safe card, a best card and so on. Cards were used for playing cards at least from Late Middle English, from Old French carte, from Latin carta, charta, from Greek khartēs 'papyrus leaf.
Earlier, in the 1500s on, a good card was used, but this probably (my guess, not official) referred to carded wool, where a good card meant a carding job on fleece that resulted in a clean, litter-free batch of carded wool. There are references to thistles and combs with card, which would also be in the manner of carding wool.
Another source wherein card (alone) was used to indicate a witty or eccentric person, a "character," puts the first usage at 1911 in The Card, a novel by Arnold Bennett.