1570s, "consisting of flakes," from flake + -y (2). Meaning "eccentric, crazy" first recorded 1959, said to be American English baseball slang, but probably from earlier druggie slang flake "cocaine" (1920s). Flake (n.) "eccentric person" is a 1968 back-formation from it. Related: Flakiness.
The term 'flake' needs explanation. It's an insider's word, used throughout baseball, usually as an adjective; someone is considered 'flaky.' It does not mean anything so crude as 'crazy,' but it's well beyond 'screwball' and far off to the side of 'eccentric.' [New York Times, April 26, 1964]