I'll echo others that it depends. The main factors are the players, rule system, setting, and how the information relates to them.
Players:
Some players will make good use of metagame information to enhance the fun, other players would rather discover what's going on in game. Also, different kinds of players like different kinds of secret information.
Rule System:
Some rule systems give the players metagame powers designed to influence the narrative of the game, and surprise information can cause problems with this. Other games have well defined rules that players expect to work a certain way, and the players should probably be informed if deviations from these rules are standard.
Setting:
Sometimes, the setting or the particular adventure the GM has created calls for something to be different from the normal rules. If the difference is something that the characters are likely know about, it is probably best to just let the players know, or let them find out about it fairly easily. For example, if they are on a tropical island, the natives will likely let them know about the volcano beast that gets angry at anyone using fire magic on the island. If, on the other hand, it is not something they could find out about, then they should learn about it during play when they realize the consequences (we didn't realize those markings were territorial markers/warning signs/etc).
Personally, I like the players to have rules transparency as to the rules, and the mechanics of how a power works once it happens (if a monster heals, they should know if it is regeneration, a spell, a healing power, if I describe damage reduction as instant healing, they should know what it is mechanically, they should also know if enemies are resistant to an attack after they try the attack). I do not give details of mechanics for rules that the characters have not encountered and have no way of learning.
Although the occasional "gotcha" style encounter can be fun, "gotcha" encounters and abilities that the players have no way of learning about until it is sprung on them should generally be avoided. The consequences should be interesting and add to the game (I hate cursed items that simply kill characters that use them, for example), and should come up close enough in time that the characters can figure out what is going on.