Legends tell of a Korean monk called Wani who introduced writing to Japan. So the Japanese at that time took the characters which had the pronunciation of the then China in the middle of the sixth century AD. The pronunciation was called Go-on or pronunciation of the Wu (mandarin chinese for Go) since Confucianism was first introduced around 285AD at the time of the Wu state. Later these have survived because of their re-association with buddhist renderings of indian words such as names of gods and beings. Since we have Buddhist texts in their original language, the renderings in Chinese, Korean and Japanese as compared with modern pronunciation has differed widely in the course of 1500 years ago.
The use of Chinese characters for either Korean or Japanese was unsuitable and clumsy. This is because Chinese is essentially a monosyllabic language whereas Korean and Japanese words frequently have polysyllablic combinations. The script was first used to write in the style of chinese literature then. Later, chinese literature was converted to a Japanese interpretation known as Hentai Kanbun since this form of writing no longer followed Chinese grammar. Eventually as translations became associated with characters, these characters assumed both Chinese and Japanese readings. Extra syllables were later represented by characters themselves, which gradually formed into the Kana syllabaries of today. Japanese writing became a mix of three systems, using chinese characters, cursive hiragana and the angular katakana.
Since there had always been contact with China, at different times in its history, different influences from the mainland would be transported home. Characters acquired different chinese readings from China as time went by. This was due to changes in local government in China, and the dialects were different from previous seats of government. So we have Go-on from the above association, Kan-on from the Han Dynasty in China onwards, and To-on from the Tang Dynasty onwards.