Then there's also the way one would say it in a condescending manner that could trigger negative emotions in the other person of which I have been a victim. This happens when one is self centered and always wants to be right like every interaction with them feels like it's a competition. Dealing with such a person could make one get annoyed because the person would rub it in your face outright gloating that you were wrong in a condescending manner like you are stupid or something just to inflate their own ego, at that point in time the phrase I told you so hits sharp like a stab it could even make you cry.
Then have you ever given someone advice or warned the person about a particular thing times without number before the inevitable happens? It's painful and really annoying when someone doesn't listen and heed a warning when they were supposed to and to say you didn't let up you did everything you could to steer the person from the wrong path to the right path and yet they refused to concur, hey it's okay to tell the person I told you so, yes indeed it is well deserved but I'll go further to say don't do it like the person above, be respectful about it and tactful. Up building words should follow suit thereafter so that the person won't focus more on the regret but on the lesson learnt this would yield a positive result and trust me the person won't think twice next time to not listen to you.
Bottom line is your tone and attitude is what really matters, so think about it before you say I told you so.