It is quite variable, I am afraid. As you learn more Welsh you may pick out some patterns. We may be able to include more examples in Tree2 - they are a key point to learn in intermediate level Welsh.
A handy, thin and cheap reference book is 'Pa Adroddiad', which shows which prepositions combine with verb-nouns to create which meanings. A more in-depth but out of print book is 'Y Geiriau Bach'.