The two example sentences from the question:
(1) That is what I said.
(2) I said it, too.
have similar meanings. They might be called related or overlapping meanings. There are situations or contexts in which either would work, and others in which only one would work. Both are likely to be replies, or parts of an exchange of dialog, and so the earlier parts of any such dialog are key to whether the sentences are appropriate and just what meaning they carry.
The answer by user Sam gave two example scenarios. Then the OP, user yunus gave a third. Let's look at number 3 again, slightly modified:
Boss: You should not smoke here, Jones. It is not allowed.
Assistant manager: That's what I said.
Here sentence (1) means that the assistant manager had already given the same instruction to Jones, and implies that Jones did not follow it. A variant on (2) could be used instead:
Boss: You should not smoke here, Jones. It is not allowed.
Assistant manager: I said that too.
Note that "I said it too." does not work here. But (1) and the modified (2) carry much the same meaning here. Also, other statements are a bit more likely here, such as:
- I said that yesterday.
- I told you that before, Jones.
- I already mentioned that to Jones.
Let's explore some other scenarios.
Scenario 4:
Boss: Did you tell Jones that shje could use the computer lab?
Assistant manager: Yes, that's what I said.
Here sentence (1) is appropriate, but (2) simply does not fit.
Scenario 5:
Boss: Did you give Jones written instructions to log out of the computer lab every time?
Assistant manager: Yes. I said it, too.
Here (2) is appropriate, but (1) does not fit.
Scenario 6:
Jones: Dis you say to shut off the red valve, and leave the green one open?
Assistant manager: That's what I said.
Here again (1) works and (2) simply does not work at all.
Note that the contracted version of (1), which might be called (1A) "That's what I said" always caries much the same meaning as the original (1) which uses "that is". (1A) is slightly less formal, and far more common.