The way you figure out the preposition is actually by looking at what kind of information you are trying to add to the sentence. Think of the prepositional phrase like a lego-block being added to the sentence.
The easiest way to figure this out is to:
1) have an understanding of what meaning each preposition carries
Examples: To = direction, for = purpose, on = position in time or space, etc
2) Ask yourself what kind of information you are looking to add to the base sentence.
Example:
Base sentence = I am waiting.
"How can I explain why I am waiting? Since for denotes purpose, I'll use for"
New sentence = I am waiting for you.
Each of these prepositions has many different meaning, so it will take a lot of studying to understand them. This little trick will help you get it right a good deal of the time, but the only way to get the correct preposition down 100% of the time is to just keep reading, listening, and practicing.
Hope this helped :)