The Soviets contend that they were going to invade Hokkaido although I do not believe this claim can be seen as credible in light of the near total lack of amphibious landing craft and the generally weak state of the Soviet Far East fleet [if you want to call it a fleet]. I also do not know what the Japanese were aware of or unaware of in regards to Soviet amphibious naval capabilities. However, with the loss of Manchuria and Korea, Japan lost a large part of its thus far untouched/undamaged industry, and it lost a large force of men [albeit of questionable training] that could have been transferred to Kyushu to defend against the anticipated American invasion. The Soviet invasion of Manchuria/Korea, by itself, without any attempt to follow-up with an invasion of Hokkaido had, without question, a devastating impact on Japan's ability and willingness to attempt to remain in the war.
The importance of the nuclear attacks have been overstated as Japan lost more in just the firebombing of Tokyo than in both the atomic bomb attacks combined, yet it did not surrender from the firebombing.
The mine campaign against their major shipping lanes [which largely destroyed Japan's merchant marine in the space of four months], the Soviet invasion of Manchuria, and the conquest of Okinawa, were substantial factors that contributed to Japan's capitulation, much more so than the destruction of two cities. America had largely destroyed a number of Japanese cities during its non-nuclear bombing campaigns and that had not compelled Japan to surrender.
If I had to rank the importance of certain factors that contributed to their surrender in 1945, I would rank them as follows-
1- The loss of their merchant fleet [an argument could be made to make this #2 on the list]
2- Soviet invasion of Manchuria [an argument could be made to make this #1 on the list]
3- Loss of Okinawa
4- Near guarantee that America was going to invade in Kyushu if Japan did not surrender
5- Nuclear strikes
6- Possible threat of a Soviet invasion in Hokkaido [with what we know now, there was no real possibility of the Soviets coming ashore against defended beaches in Hokkaido and they would have even had problems unloading in a poorly defended port due to the lack of amphibious invasion capabilities and their lack of experience with naval/amphibious logistics] but there is no way to be certain if the Japanese were aware of the Soviet limitations in amphibious operations
The first two are the most importance, as the loss of their merchant fleet meant that people in Japan were largely starving and the military would have to make do with whatever they had. Organized and effective resistance becomes very difficult when the soldiers are malnourished and low on all manner of supplies. The Soviet invasion of Manchuria cost Japan its most intact industrial/resource base and it cost Japan 600,000 soldiers and several thousand armored fighting vehicles, many of which would probably have been transferred to Japan for the defense of Kyushu in anticipation of the American landings.
The consistent conclusion of the authors I have been reading is that the dropping of the two nuclear bombs on Japan was unnecessary and the attacks were not the main factor in the Japanese surrender.