Last week I saw a young boy walking home with his mother from school. He tripped on the bottom of his pants, fell, skinned his knee and burst into tears. His mother reminded him that she had told him this might happen if he wore those pants.
It would have been so much better had she just used empathy to comfort him. Had she instead said something like "Oh how sad. That really hurt.", she would have been on the same side of the problem as her son with his bad decision on the other side.
Nobody likes hearing "I told you so". It can be sometimes feel good to say it but it is far better for your relationship with that other person if you avoid saying it.