(1) 剛來中國時,我一句漢語也沒聽懂
When I first arrived in China, I wasn't even able to understand a word of Chinese.
This sentence is slightly unidiomatic when used by itself in Chinese, and would more commonly be used in a background context that's already understood. My immediate impression is that it would be the sentence which applies to someone who may have learned Chinese before, but wasn't accustomed to a normal-level of Chinese speaking speed, colloquialisms, accent, etc, and so wasn't able to understand anything upon arrival into China. For example,
雖然我已經在國外大學讀了三年漢語,但是,當我剛剛來到中國的時候,我一句話也沒有聽懂。
Even though I've studied Chinese for three years in an overseas university, upon my arrival into China, I wasn't even able to understand a word of Chinese.
(2) 剛來中國時,我一句漢語也聽不懂
When I first arrived in China, I didn't even understand a word of Chinese.
This sentence is usable as-is, but my immediate impression is that, without context, it implies that you never had any experience in learning or communicating in Chinese at all. For example,
當我剛剛來到中國的時候,我一句漢語也聽不懂。現在,在北京大學上完了一年的漢語課程之後,我新聞和連續劇都基本可以看得懂了。
Upon my arrival into China, I didn't even understand a word of Chinese. Now, after one year of attending Chinese classes at Peking University, I'm able to grasp most of what's being said on the news and TV dramas.