I've tried to find this out and it seems to be a dark hole. Etymology Online doesn't have much
nut, (n.)
"hard seed," 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 from 1915. Nut-brown is from c. 1300 of animals; c. 1500 of complexions of women.
Meaning "crazy person, crank" is attested from 1903 (British form nutter first attested 1958; nut-case is from 1959); see nuts. American English slang sense of "amount of money required for something" is first recorded 1912. The nut that goes onto a bolt is first recorded 1610s (used of other small mechanical pieces since early 15c.). Nuts and bolts "fundamentals" is from 1960.
There is some evidence that it is from the middle French word for screw, escroue, perhaps indicating that the two items were conflated
http://www.etymonline.com/index.php?term=screw
screw (n.)
"cylinder of wood or metal with a spiral ridge round it; hole in which a screw turns," c. 1400, from Middle French escroue "nut, cylindrical socket, screwhole," of uncertain etymology; not found in other Romanic languages. Perhaps via Gallo-Roman *scroba or West Germanic *scruva from Vulgar Latin scrobis "screw-head groove," in classical Latin "ditch, trench," also "vagina" (Diez, though OED finds this "phonologically impossible").
The name for nut in French is still écrou apparently from the the hole made by swine in rooting, but still referring to the mechanical not botanical nut.
http://en.academic.ru/dic.nsf/cide/155273/Screw
But as Diaz says, this seems to be phonetically impossible.
Re the history of the nut and bolt, the screw thread is nothing new, it was around from at least the times of Babylon and Archimedes, the real innovation in the late 16th century was the pairing of a part that had a screw thread on the inside. Prior to that, fasteners were more like pegs, still called bolts and they date back to the Ancient Rome. The nut in the threaded bolt and nut invented Besson in France was probably a simple square block of wood with a hole in the middle, probably tightened with a piece of rope wrapped tightly around it to act as a wrench. Probably at the time, the screw and nut was sold as a set (and why wouldn't it be, one is pointless without the other) simply named a escroue, and it wasn't until later, perhaps when they were being produced by Hindley of York in 1641 that the names diverged.