1) When to use "to"
Use "to" when there is some kind of transfer happening or something is being moved from one place to another. "To" expresses direction.
Here are a few examples:
"We went from the restaurant to the party."
"Talk to your teacher and get more information about the exam."
"I go to the office every morning at 9am."
"He sold his car to me for $5,000."
2) When to use "for"
1) Use "for" when something is being done to benefit something or someone else.
2) Use "for" when you are trying to express purpose or the reason that something is happening
Examples:
"I bought this gift for you."
"He runs for his health."
"Bring this tea upstairs for your grandmother."
"Buckle up for safety."
3) Now compare both
Example 1:
"My friend brought lunch to me." (My friend physically carried the lunch and delivered it to me)
versus
"My friend brought lunch for me." (My friend paid for my lunch because he wanted to do something nice for me)
Example 2:
"I made a quick phone call to my mom." (I called with the intention of speaking with my mom)
versus
"I made a quick phone call for my mom." (My mom wasn't able to make the call so I made the call for her)
منبع:http://www.englishandculture.com/blog/bid/95563/Quick-English-Grammar-Tip-To-Versus-For