Were they useful as internal propaganda? Did any of the nonaligned countries change allegiance due to the launch of Sputnik (for the USSR) or the Moon Landing (for the USA)?
Disclaimer: I'm a space lawyer not a space historian although I did do my BA in History
I know of no evidence of any country switching sides during the Cold War due to space successes or failures however space did help Cold War aims.
First, let’s start with Sputnik, the biggest way this helped the USSR (apart from the obvious propaganda coup of beating the Americans to space) was by covering up how far behind they were in missile technology. The R7 which launched Sputnik was intended to deliver nuclear warheads; however it was pretty useless for this task (at least at this time.) The famous ‘missile gap’ that Kennedy would use in the 1960 election campaign didn’t exist. Not only did the USSR not have many missiles, they weren’t capable of effectively delivering nuclear weapons not that that would have mattered as they also didn’t have adequate shielding to protect them during re-entry. Sputnik allowed the Soviets to cover up this fact and make the world think they lead the world in peaceful and military uses of space.
Although, it should be noted that Sputnik also helped the Americans by providing a legal precedent of freedom of over flight ‘in space’ which the Americans would later use to protect their spy satellites (space, unlike airspace is not subject to national jurisdiction which at least until Sputnik’s flight was a sizeable and unresolved legal question). Indeed, some have even suggested that Eisenhower might have even ‘let’ the Soviets go first in order to secure this legal precedent (Eisenhower certainly valued spy satellites more than he did prestige.) (See McDougal, The Heavens and the Earth and Spaceflight and the Myth of Presidential Leadership for more).
The other 'space successes' didn't have that much of an impact on the Cold War other than in the vague notions of prestige. Although, it was diplomatically useful to be able to send astronauts or cosmonauts on world tours or give out moon rocks as gifts (and Nixon claimed that the Apollo 11 successes helped him open communications with China via Romania see Logsdon After Apollo?.)
However, the biggest help during the Cold War was one nobody really knew about, spy satellites. These made both sides more willing to embark upon arms control as they were able to verify compliance without having to give free access to their facilities. They also provided both sides with more accurate and up to date information which helped to clear the fog of war during times of crisis. And on at least one occasion, prevented nuclear war (a training tape had mistakenly been loaded into the US defence computers and so the military mistakenly thought the USSR had launched an all out attack, however they were able to demonstrate the non existence of incoming Soviet ICBMs thanks in part to the space based surveillance systems before the President gave the order to retaliate. see Moltz The Politics of Space Security for more details)
Of course, as in all things, it's impossible to prove a counter factual, maybe the US would have been irreparably damaged by failing to get to the Moon by 1970 or worse, the Soviets getting there first?
Sources
Rockets and People by Boris Chertok (4 Volumes) http://www.nasa.gov/connect/ebooks/rockets_people_vol1_detail.html
After Apollo? Richard Nixon and the American Space Program by John Logsdon
John F. Kennedy and the Race to the Moon by John Logsdon
Spaceflight and the Myth of Presidential Leadership edited by Roger Launius and Howard McCurdy
The Soviet Space Race with Apollo by Asif Siddiqi
Sputnik and the Soviet Space Challenge by Asif Siddiqi
Reconsidering Sputnik: Forty Years Since the Soviet Satellite edited by Roger Lanius, John Logsdon, Robert Smith
Soviet and Russian Lunar Exploration by Brian Harvey
Korolev: How One Man Masterminded the Soviet Drive to Beat America to the Moon by James Harford
The Politics of Space Security: Strategic Restraint and the Pursuit of National Interests by James Clay Moltz
The Heavens and the Earth: A Political History of the Space Age by Walter A. McDougall
A Man on the Moon by Andrew Chaikin