We use this expression to say that we were right about something, or that we warned someone about something which later happened.
I tried to borrow Pat's car, but she said no.
I told you so. She never lends anyone anything.
I wanted to have lunch in that restaurant but it was closed.
I told you so. It's only open in the evening.