You can remember the meaning of 碰巧 with this easy mnemonic:
I touched (碰) this wall and by chance, stumbled upon some hidden treasure. It was a moment of opportunity (巧) since I just so happened to be broke.
Using mnemonics to remember the meaning of Chinese characters like can have an enormous impact on how long to learn Mandarin it takes.