Classified information is perhaps the most obvious example. Attorney-client privilege also comes to mind.
A somewhat subtler example is insider trading. Knowledge of material non-public information isn't, per se, illegal, but sharing it with someone who intends to trade on it is.
Well, not sure if this is what you had in mind, but for example the U.S. has laws prohibiting the export of various encryption products, classing them in the same category as weapons etc.
I'm sure they will also have laws on the discussion (online or otherwise) of building or using explosives or other dangerous substances regardless of the intent or ability of those present to actually do anything. These pieces of information could arguably be deemed 'illegal'