From Glitch City Laboratories
This article is about the error trap for when a player attempts to speak to a character with no dialog defined to them in the Generation I and Generation III Pokémon games. For instances when the game may display only "!" in the Generation IV Pokémon games see Spacing syntax glitch.
"!" refers to a placeholder term for when the player attempts to speak with a character with no dialog assigned to them on Pokémon Red, Pokémon Green, Pokémon Blue and Pokémon Yellow. Its purpose is unconfirmed, however it presumably acts as an error handler to prevent the game from crashing otherwise.
This message can be trigerred when for example, the player uses a walk through walls glitch or code to speak with one of the Pokémon in Fuschia City's zoo. A more common instance is when trying to "speak" to the other player in the trade center or Colosseum.
This message also appears in the Generation III games when the player tries to examine a berry plant while the plant is changing its phase of growth.