Here is the way I use these words:
There is a subtle difference in meaning and usage.
This letter/book/ flower is for you. (A general statement - it �s for you and I �m giving it to you)
This letter is to you. (The letter specifically has your name and address on it)
Your second sentence is common usage: for me doesn �t sound as natural
This exam is important to me.
To use for me I�d say:-
It is important for me to pass this exam.
It is important to me to pass this exam. (this is also OK)
Thank you. Your help meant a lot to me. ( for me can �t be used here)