Old English streng "line, cord, thread, string of a bow or harp," in plural "tackle, rigging; lineage, race," from Proto-Germanic *strangiz (source also of Old Norse strengr, Danish streng, Middle Dutch strenge, Dutch streng, Old High German strang, German Strang "rope, cord"), from *strang- "taut, stiff," from PIE root *strenk- "tight, narrow." Gradually restricted by early Middle English to lines that are smaller than a rope. Sense of "a number of objects arranged in a line" first recorded late 15c.
Old English meaning "ligaments, tendons" is preserved in hamstring (n.), heart-strings. Meaning "limitations, stipulations" (1888) is American English, probably from the common April Fool's joke of leaving a purse that appears to be full of money on the sidewalk, then tugging it away with an attached string when someone stoops to pick it up.
To pull strings "control the course of affairs" (1860) is from the notion of puppet theater. First string, second string, etc. in athletics (1863) is from archers' custom of carrying spare bowstrings in the event that one breaks. Strings "stringed instruments" is attested from mid-14c. String bean is from 1759; string bikini is from 1974.