And in extension, why didn't religion play as much of an important role as it did to Afghanistan in Cold War?
In the strict sense, after 1945, when State Shintoism was erased after WWII, among other reforms. The Emperor declared that he "wasn't" (mostly for American consumption. The wording in Japanese is a little more complicated and subtle, as it usually is, and Hirohito and many Japanese actually didn't see repudiation of divinity as the point of the script) a direct descendant of Amaterasu.
Because in Japan, religion really isn't so much a "belief" thing so much as it is a social code thing. It's not (and it wasn't back then) at all uncommon for Japanese people to take part in both Shinto and Buddhist ceremonies for different events in life. It's not seen as a contradiction as it would be in other parts of the region or the world.
That being said, I'd argue that State Shintoism was very, very important insofar as understanding Imperial Japan. It might not have been the official raison d'etre for WWII as a radical version of Salafist Sunni Islam (Qutbism) is for jihadists and their wars today, but it was very important to understand the psychology of the nation.
This book offers a lot of explanation regarding this question: http://www.amazon.com/Invention-Religion-Japan-Ananda-Josephson/dp/0226412342
I read this book during my undergraduate studies; I focused on Religion and traveled to Japan so I may be able to answer a little bit of your question. This book in particular really stuck with me because it makes you re-evaluate what you think you know about secularization and religion.
First thing to note is that Japan did not have a specific word for what we call "religion." To them (and many other Asian societies), religion is not separate from everyday living, so they never saw religion as it's own, independent thing. This also goes along with concept of oneness. If you are familiar with Asian philosophies, you will know that their philosophies center around this idea of interconnectedness and interdependence. Assuming you are American, or at least from a Western culture like me, these concepts are very hard for us to understand. We were brought up in a very different world were we recognize things as independent and dualistic; things are separated in our world. Even our language dictates this thought process, just as Japanese language lends more to this oneness perspective. So first thing is understanding how the Japanese viewed religion--they viewed it as part of everything they did, including the laws of the state.
The second thing I want to mention is that when Japan was forced to open it's borders (sometime in the mid 1800s) they were also forced to define religion. This was a difficult task and a huge road block in intermingling with the West because we wanted to Christianize them. Well, not just us, the Dutch and others had been attempting to Christianize Japan long before we came along. Japan was prime property though; there is a lot of evidence showing that the Western counties viewed the Japanese as barbarians because they had been cut off from the rest of the world for so long. We viewed their practices as barbaric, and used this as justification for introducing Christianity. Side note: attempts to Christianize Japan happened in the 1600s(?) I believe, which was a big reason they shut off their trading and isolated themselves (small groups of Japanese practiced Christianity in secret during these times though, they would use "magic mirrors" which were originally from China, and they would craft them so that images of Jesus and the cross were visible only when the user put the mirror in sunlight. Practicing Christianity was a crime punished by death).
http://www.hightouch-japan.com/special/?act=detail&id=20
I don't know anything about the Cold War and Afghanistan, so I can't offer anything to this portion of the question. But, the last thing I will say to wrap up this ramble is that Japan defined religion in an interesting way once they became part of the rest of the world. What they did was this: they made Shinto a state ideology, and they categorized Buddhism and Christianity as religions. Shinto is a religion, though there are many arguments saying otherwise, the Japanese know it is a religion. But they wanted to retain their religion and their identity as a culture; they didn't want to become Christianized. So, this opportunity to define religion was great for them and they played their cards right because they were able to retain Shinto and integrate it into the state ideology so now Shinto is synonymous with Japanese culture as opposed to a religion. So, in some sense, you can argue Japan never truly secularized.
Another interesting thing to note about Japan is the role of the emperor. I don't know much about this, but when I traveled to Japan and visited the museum in Hiroshima (located next to the location where the bomb dropped) I learned that one of the terms of surrender during WWII was for the Japanese emperor to publicly announce that he was not a decedent from the Shinto gods. This pissed the Japanese off since, the Shinto "gods" were then integrated into their state ideology, and they saw this as another attempt to Christianize them. They viewed Christianization as a loss of power to the West. This is a huge reason why they did not agree immediately to the terms of surrender, which lead to the bombs being dropped. Of course, this is the Japanese perspective of WWII which is biased, but it is a point-of-view that I, as an American, had never heard before. General Douglas MacArthur is quoted in the museum saying something along the lines that "the Japanese gods have failed, bring Christianity to the land and have the emperor tell the Japanese people that he is no god." I tried to find a source on this, but am unable to. I read this in Japanese, not English, at the time of learning this so that's all that I remember of it. I'm sure with some research you could find more on this subject if interested.
And to finally end my ramble, here is an archived thread that might be useful to you :)