"it is good for me." or "it is good to me."? what's the difference between "for" and "to"?
1. "be good FOR" + noun = it is healthy, it improves you, it has a positive effect on someone or something
Vitamins are good for me.
Fried chicken is delicious but it isn't good for you.
A few days on the beach will be good for Tom.
Drink this tea. It's good for colds. (= the tea will cure your cold)
2. "be good TO" + person = behave nicely with someone, treat someone well
Be good to your little brother while your father and I are out tonight.
I don't want to change jobs. This company has always been good to me.
3. "to me" -- a totally different expression that means "in my opinion." It is often used to compare your opinion with other people's opinions.
To me, Christmas is about spending time with family.
Some people hate peanut butter, but to me, it's delicious.
People call it "stinky tofu" but it smells good to me.
That sounds like a good idea to me.
"Is it good for me?" means "Is this healthy?" or "Will it help me?"
"Is it good to me?" is probably wrong. Maybe you could ask that if you are not sure if a robot will treat you well. But people often ask questions like, "Is your boyfriend good to you?" or "Is she good to him?"
You also asked about this sentence:
"The food might have tasted bad TO HER, but it is good TO ME." Both of the prepositions should be TO since they have the meaning of expression #3 above.
I hope this helps!