To be cranky; to have an idiosyncrasy; also, to carry a jewel or ornament in your cap.
Thought to originate from the following poem:
“For pity, sir, find out that bee
That bore my love away –
‘I’ll seek him in your bonnet brave…..”
Herrick: The Mad Maid’s Song.
Extracted from: The Dictionary of Phrase and Fable pub. 1898 by E. Cobham Brewer (1810–1897)