c.1780, of uncertain origin; it first appeared in a Scottish border ballad:
I've heard my granny cracketc. In that region, Dandy is diminutive of Andrew (as it was in Middle English generally). The word was in vogue in London c.1813-1819. His female counterpart was a dandizette (1821) with French-type ending. The adjective dandy first recorded 1792; very popular c.1880-1900. Related: Dandified; dandify.
O' sixty twa years back
When there were sic a stock of Dandies O