"the fruit of certain trees and shrubs which have the seed enclosed in a woody covering not opening when ripe," Middle English note, from Old English hnutu, from Proto-Germanic *hnut- (source also of Old Norse hnot, Dutch noot, Old High German hnuz, German Nuss "nut"), from PIE *kneu- "nut" (source also of Latin nux; see nucleus).
Sense of "testicle" is attested by 1915 (nuts). Nut-brown "brown as a ripe, dried nut" is from c. 1300 of animals; c. 1500 of complexions of women. The mechanical nut that goes onto a bolt is first recorded 1610s, from some fancied resemblance (nut was used of other small mechanical pieces since early 15c.). The figurative nuts and bolts "fundamentals" is by 1952. The American English slang sense of "amount of money required for something" is recorded by 1912.
Meaning "crazy person, crank" is attested from 1903; British form nutter is attested by 1958. Nut-case "crazy person" is from 1959; nut-house "insane asylum" is by 1929. For more on this sense, see nuts. In slang, nut also meant "fashionable or showy young man of affected elegance" [OED], 1904.