Considering the number of languages in the world, I really don’t have much to go on, but my impression is that the more homophonous a language’s lexicon, the more unphonetic its writing system.
Here are some languages that I have some acquintance with that I’ve grouped according to their relative homophony and orthographic phoneticism, from the least homophonous and most phonetic to the most homophonous and least phonetic:
Group 1: Spanish, Italian, Portuguese, Greek, Russian and Finnish.
Group 2: English and French.
Group 3: Languages using the Chinese writing system and Japanese.
This grouping I freely admit is purely impressionistic: I have no hard data on the amount of homophones in each language, although the relative phoneticism of the writing systems I can say with confidence is about right.
The link that I’ve conjectured, if it does indeed exist, would seem to make sense. Written and spoken languages are different — you don’t often say what you write and vice versa — partly (mostly?) to take advantage of the particular properties of pages and eyes, voices and ears; so it shouldn’t necessarily come as a surprise that homophones need further elucidation on the page and a move away from pure phoneticism becomes desirable.
I think Korean would be one language to go against the presumed trend — its writing system, Hangul, is deeply phonetic while having to deal with a number of homophones that come from Chinese loanwords.
I also suppose that Korean illustrates another linguistic trend: the later a writing system’s invention or adaptation for a specific language, the more phonetic it is designed to be from the outset, and the less time has passed for the spoken language to have drifted from how it’s written down.
Of course, take this with a large, unsubstantiated grain of salt: it’s all speculation based on the private musings of a very amateur linguist, none of which is supported even by a Wikipedia page written by a prankster.