Interestingly, the Social Security Administration (SSA) fought the evolution that the SSN underwent from being a programmatic tool for the SSA to being the de facto ID number for most Americans.
The number originated as a tool for the newly formed Social Security Board (now the SSA) to track the earnings of employees who would be eligible for their new federal benefits program. FDR signed the Social Security Act in 1935, and the original plan was to begin to deduct taxes and soon after roll out benefits for eligible workers by the start of 1937. One of the earliest questions the Social Security Board faced was how on earth they would be able to track each of these workers efficiently and effectively.
A few ideas were thrown around early on, like name and address and fingerprinting. Fingerprinting, which was used by the military, was tossed because of the public stigma of the method's attachment criminal activity. As an aside, a publication from the time offered a humorous anecdote about name as an insufficient identifier. There were enough Fred Smiths in the New York area that were having enough trouble proving they were a particular Fred Smith that they banded together and created "Fred Smiths, Inc." as a sort of "clearinghouse" for their identification woes.
Numbering emerged as a practical alternative to the above. Much debate and discussion was involved in choosing the current 9-digit format, but the format of the number has little to do with why it has become so widespread. The only notable features of the SSN as an identifier that are relevant here are that it is unique even posthumously (SSNs for the deceased are never reused) and it is long enough to continually provide unique identifiers for newborns. Beyond that, the primary reason for its spread was the decision of other federal agencies, and then eventually private groups, to use the number for reasons other than social security. The first usage of the number outside of the Social Security Board was an executive order from 1943 that required federal agencies to use it as an ID number for identifying individuals in new record systems. The SSA notes that the process of federal agencies using the number became much more widespread with the introduction of the computer.
The aforementioned fight against its spread as a de facto ID comes from a 1971 task force put together by the SSA to evaluate issues raised by non-program usage of the number. This task force, and a similar 1973 report by what is now Health and Human Services, concluded that its use as a national identifier was not wise. However, federal agencies began more and more to require it for a variety of processes, and Congress continued to pass legislation requiring its use for many more things. A full list is provided on the SSA website, but some of the notable developments include:
The Civil Service Commission adopts its use as a federal employee ID in 1961
The IRS uses the SSN for federal tax purposes starting in 1962
Legislation requires banks, savings and loan associations, credit unions, and securities dealers to obtain the SSNs of all customers in 1970
Legislation allows states to use the SSN as an identifier for certain state programs in 1984
Additionally, in 1987 the SSA started a program called "Enumeration at Birth" by which a parent can request their child be issued an SSN at their birth. Originally this was a three-state pilot program, but by 1991, only 5 states didn't have an EAB program.
All of these things led to massively widespread usage of the SSN, and there has never been any legislation preventing private industry from using it as an identifier as far as I can tell, and so its near ubiquity has led to its adoption in many of the ways we know of the private sector using it today.
Tons of additional reading can be done on the SSA website. Their own history is impressively exhaustive. There's also some pretty interesting stuff (I think) about how the number was decided upon, who has the lowest number and why, etc.
In some ways, it started when the first cards were issued. It was, after all, the only unique identifier for most Americans, so it's utility for other purposes was pretty apparent.
The Government soon realized this and tried to discourage it. (From SSA.GOV):
The first Social Security cards were issued starting in 1936, they did not have this legend. Beginning with the sixth design version of the card, issued starting in 1946, SSA added a legend to the bottom of the card reading "FOR SOCIAL SECURITY PURPOSES -- NOT FOR IDENTIFICATION." This legend was removed as part of the design changes for the 18th version of the card, issued beginning in 1972. The legend has not been on any new cards issued since 1972.
Of course, the government itself didn't follow the guidelines, authorizing the IRS to use it for identification in 1961. (Pub. L. No. 87-397, 75 Stat. 828)
In 1973, a Government report, Records Computers and the Rights of Citizens, did a good job of anticipating the risks of massive amounts of data keyed to a single number.
The report recommended several limitations on the use of the SSN and specifically said that legislation should be adopted "prohibiting use of an SSN, or any number represented as an SSN for promotional or commercial purposes."
In response to growing concerns over the accumulation of massive amounts of personal information and the recommendations contained in the 1973 report, Congress passed the Privacy Act of 1974. Among other things, this Act makes it unlawful for a governmental agency to deny a right, benefit, or privilege merely because the individual refuses to disclose his SSN. This is a critical principle to keep in mind today because consumers in the commercial sphere often face the choice of giving up their privacy, their SSN, to obtain a service or product. The drafters of the 1974 law tried to prevent citizens from facing such unfair choices, particularly in the context of government services. But there is no reason that this principle could not apply equally to the private sector, and that was clearly the intent of the authors of the 1973 report.
On a more personal note, it sounds crazy in this identify-theft world, but when I was a kid in the 70's, people would engrave their SSN on valuables, so that if they were stolen, they could be easily returned. This continued well into the 80's. It was really the 90's that people started clamping down and refusing to give out SSNs for purposes other than taxes and Social Security.