The reason why the Soviet Union backed down over Iran is still the subject of debate, but there does not appear to be any evidence that he threatened a nuclear strike. Nor would Stalin have needed reminding of American nuclear capability.
There was, though, considerable diplomatic pressure from the US both inside and outside the UN. It is also worth noting that the Soviet withdrawal came a month after they had concluded negotiations with the Iranian government on terms highly favourable to the former.
The US's opposition to the Soviet presence in Iran was made very clear on several occasions, from Secretary of State James F. Byrnes' Feb. 28th speech (which Truman saw in advance) to official protests both to the Soviets and at the United Nations. On the Soviet decision to leave Iran, Robert H. Ferrel in Harry S. Truman and the Cold War Revisionist says:
What prompted them to get out was unclear....Adam Ulam advanced the
piquant theory that the Russians scampered out of Iran because
Churchill had just accused them of imperialism and they did not want
to provide an obvious proof... Truman, in a press conference in 1952,
told of a presidential ultimatum to the Russians and repeated this
account in his memoirs as well as in a book entitled Truman Speaks,
published in 1960, and in a conversation with Herbert Druks in 1962. A
volume of Foreign Relations contained an editorial note to the
effect that records in the State Department and in the Department of
Defense contained absolutely no indication of an ultimatum and that
several former high officers of the State Department who were queried
about this issue had no memory of one.
Truman's statement in 1952 was:
In 1945 I had to send an ultimatum to the head of the Soviet Union to
get out of Iran. They got out because we were in a position to meet a
situation of that kind.
On this 1952 statement, a White House spokesman later the same day clarified that
the President was using the term ultimatum in a non-technical layman
sense...the President was referring to the United States leadership in
the United Nations...and through diplomatic channels, in the Spring of
1946, which was the major factor in bringing about Soviet withdrawal
Truman's claims of an ultimatum in 1945 would mean it came before the report "Dialectical Materialism And Russian Objectives" of January 1946, his statement to Secretary of State Byrnes "I'm tired of babying the Soviets" in the same month, and the Kennan telegram in February which criticized the previous President's "friendliness and cooperation with Soviet leader Joseph Stalin". Threats of force usually follow diplomatic pressure, not precede it.
Further confusion about what message Truman did or did not convey to the Soviets resulted from Truman "furnishing various accounts" due to his "fading memory in later years", according to this jstor article. Although Truman (on the evening of March 4th) ordered the USS Missouri (heading for Turkey) to be accompanied by a naval task force as a show of force, this task force was not actually assembled until August; the Soviets were out of Iran in May, a move which came shortly after the (for them) successful conclusion of negotiations (on April 4th) in which the Iranian government conceded oil rights favourable to the Soviets.
Truman's statement in his 1960 book Truman Speaks was:
When Stalin refused to move out of Iran at the time agreed, I sent him
word I would move the fleet as far as the Persian Gulf. He got out.
Actually, the fleet was sent to the Turkish straits as Turkey was also under pressure from the Soviets. Even if Truman did say this to Stalin (and there is no supporting evidence for this), there is no mention of the involvement of nuclear weapons.
Whether or not Truman issued an ultimatum, the Soviets were under enormous diplomatic pressure to get out of Iran, having heavily lost two United Nations votes. Also, Stalin was not blind to the damage to Soviet interests a continued violation of the 1942 Tripartite Treaty and the UN charter would do.
E. Edwards Spalding, The First Cold Warrior: Harry Truman, Containment, and the Remaking of Liberal Internationalism
David Holloway, Nuclear weapons and the escalation of the Cold War, 1945–1962
Zulkanain Abdul Rahman, Amer Saifude Ghazali, Rosmadi Fauzi and Norazlan Hadi Yaacob, Britain, the United Nations and the Iranian Crisis of 1946