First of all, we should realize that it is very hard to say for sure why things like cultural changes and cultural differences arise. In a sense, they are inexplicable because we cannot say why different people act differently.
Second, we should note that the Korean and Japanese culture were not completely different from one another and were, especially, not completely different from that of China. Both countries got their first writing systems from China. Both countries still use Chinese characters to some extent, though Japan uses them much more than Korea. Both countries had a strong Buddhist presence. Korea had a Chinese system of government for a very long time. We should, then, not overestimate the differences between the cultures.
To the degree that these countries had separate cultures, geography is the main reason. In the case of Japan, the geographic factor is obvious. The ocean separating it from the other countries has been a major means of keeping its culture separate. The most obvious example of this was when the Japanese got help from storms to defeat the Mongol invasions. Korea, as a peninsula, is less insulated from China, but it is still very much on the periphery of China and is harder to penetrate because of its geography.
So, the main cause of the separate cultures is geography.