This phrase is used to praise small children. It means "you did a good job".
However, when this phrase is used toward an adult, it can seem insulting. It sounds patronizing, like you are suggesting that the person you say it toward is a little kid.
"Good for you" can also seem like a rude way of saying "I don't care." For example, you might say it if someone you don't like is bragging about something:
A: I was the class president of my university.
B: Good for you.