It's a subtle difference.
"I have to say something" places the emphasis on the importance of saying something. Like if you see two children beating up a third child, you might say "I have to say something" meaning you have to talk to the children, or you have to report them to school authorities. "I have to say something, I can't just walk away and let this happen"
"I have something to say" actually happens in movies a lot. During a debate or an argument, a usually quiet person who hasn't said much will stand up and say "I have something to say" "I have something of value to contribute to this conversation" etc.
Hi Margo. It seems that the impression one gets from this discussion is that this is a "tener que" sentence. I strongly disagree. If it were, "tener" (conjugated) would have to be immediately followed by "que." Then the sentence would be: "Tengo que decir algo" (I have to say something). This is obviously not the sentence Duo has given us. Not only is the word order different, but the meaning has also been changed. I think an English translation of "Tengo algo que decir" (I have something that (I want) to say) reveals the use of "que" in the sentence.
UPDATE: The key to understanding this sentence is realizing that "que" is acting as a relative pronoun and is probably best translated as "which," although in the English translation the "which" would most likely be left out. It is followed by "decir," an infinitive that explains what the "something" is. So the sentence actually says "I have something (which) to say." I doubt that Duo would accept the "which," though.