I remember Einstein saying something about how nuclear research was dangerous and could lead to atomic bombs (in a letter to FDR, I think?). Correct me if I'm wrong there. But were there attempts to stop knowledge of nuclear research from spreading, when scientists first began discovering information on it? When did there begin to be serious fears of nuclear weapons?
After the discovery of fission, Leo Szilard attempted to convince other scientists in several countries to self-censor anything regarding nuclear chain reactions. Major scientists in the US, UK, and Denmark agreed to a temporary ban; the French physicist Frederic Joliot-Curie and his team declined, and published immediately on the subject. After that, many articles, including from some of those who initially agreed to hold back, published.
Szilard's efforts, though, were not entirely for naught, as it did lead to the first secrecy infrastructure, a committee within the National Research Council that would secretly review papers on fission prior to publication in the United States. It was all entirely voluntary, still — it had no legal enforcement. This infrastructure was eventually taken over by the Manhattan Project when it got established, several years later.
There was never any coercive attempt to stop scientists who were not affiliated with the Manhattan Project from publishing on this subject; it was always voluntary. It is not clear that US law would allow for such an attempt, legally speaking (this would be known as "prior restraint" and the bar for it is extremely high, because of the First Amendment). There was also voluntary press censorship enacted, but it was not fool-proof (and, again, voluntary).
The real act that stopped scientists in the US from publishing on this subject was the expansion of the Manhattan Project, which meant that pretty much anyone who was working on fission or related questions got taken inside the veil of secrecy, signed a secrecy act/pledge, and agreed that their work fell under the Espionage Act of 1917, which meant that they could be arrested or even executed for giving it to unauthorized persons. The Manhattan Project administrators were aware of this. Vannevar Bush, head of the Office of Scientific Research and Development, remarked in a letter to a Naval security officer in early 1942 that:
"...on this particular subject, as far as its scientific background is concerned, there are many individuals in this country having rather complete knowledge as a result of their study of physics, and these are by no means all under [our] control. Hence there has been an experience in the past which is not desirable, for the subject has been discussed not only among physicists rather widely, but also in popular articles. They continue to appear in the press even now.
"Under these circumstances, when we take a man into work on such a matter we give him in some cases no new information whatever. When we do take him into the organization, however, we do so with caution, and we place him under oath and impress upon him his responsibilities. In many cases, therefore, I feel it is highly desirable to take a man in case of doubt rather than to leave him entirely without control, and I have followed this policy in several cases. ...
"In fact, I am inclined to believe that should the subject become at all imminent in the sense of promising practical results within a reasonable interval it would be well to take in and put under thorough control practically every physicist in the country having background knowledge of the subject, but the time for this has certainly not arrived."
That last paragraph is the real kicker — Bush was imagining, well before the bomb was under way, the possibility of just forcing all physicists to sign security oaths. They didn't do that, but it shows how they thought about this, at the time. (The context of this letter is also interesting: the Navy wanted to deny physicist Arthur Compton a security clearance because he had signed some politically unfavorable petitions. Bush was explaining that in this instance, he didn't give a damn what the Navy thought, because he didn't think this was a standard security situation.)
As for the question about the fears of nuclear weapons, there were phases. In 1939, most scientists in the USA thought it was possible but not very likely that nuclear weapons might be developed soon. Even by mid-1941 this was the American consensus, with a few notable outliers (like Szilard). In mid-1941, several key scientists (including Bush) became convinced that nuclear weapons were easier to make than they'd previously thought (an influence of the British MAUD committee). They seized control of the existing program and started to accelerate it. By late 1941 they had started increased the secrecy measures in place and by 1942 they were shifting into a real bomb production program. By 1943 the Army was more or less in charge of things and they were thinking of the bomb in real terms. By 1944 they were making concrete plans about using it.