Although the certain origin of nunchaku is disputed, it is thought to come from China through the Japanese island of Okinawa[citation needed]; and according to the History Channel they were created in their current incarnation for the movies. The Japanese word nunchaku itself comes from the Hokkien (Min Nan) word ng-chiat-kun (™_ßžž). When viewed etymologically from its Okinawan roots, nun comes from the word for twin, and chaku from shaku, a unit of measurement. The popular belief is that the nunchaku was originally a short flail used to thresh rice or soybeans (that is, separate the grain from the husk).It is also possible that the weapon was developed in response to the moratorium on edged weaponry under the Satsuma daimyo after invading Okinawa in the 17th century, and that the weapon was most likely conceived and used exclusively for that end, as the configuration of actual flails and bits are unwieldy for use as a weapon. Also, peasant farmers were forbidden conventional weaponry such as arrows or blades so they improvised using only what they had available, farm tools such as the sickle. Regardless of the origin of the nunchaku, the modern weapon would be an ineffective flail.
The nunchaku as a weapon has surged in popularity since martial artist Bruce Lee used it in his movies in the 1970s. It is generally considered by martial artists to be a limited weapon, although it is also one of the least understood weapons. Complex and difficult to wield, the nunchaku lacks the range of the bo (quarterstaff) and the edged advantage of a sword. The nunchaku has a steep learning curve. It is also prone to inflicting injury on its user. Nonetheless, the nunchaku's unrivaled speed, confusing motion, and incredible striking force contributed to its increasing popularity, peaking in the 1980s, perhaps due to its unfounded association with ninja during the 1980s ninja craze.
Peasents were not allowed to carry sword or bow, so they improvised as outlined above, the source for that is Wiki but google it and you will get much the same results on most sites.
It also says the same in most books on ancient weaponry, I will take them over some guy someone knows who studies ninjitsu.