I believe the default purpose of the terrain tags is, in a role-playing game, to determine the enemies you will be fighting. At least, this was the case with previous RPG Makers. If you stepped on a beach terrain, you would fight beach enemies, contrary to stepping on grass terrain, where you would fight grass enemies. However, it seems as though this function was lost on RPG Maker XP. Perhaps they thought it, hence the appearance of terrain tags, and never went through with the idea. Regrettably, the RPG Maker XP Table of Contents says absolutely nothing regarding terrain tags. I've searched. Mostly, it is used, as Blue Scope and Plague 180 have already stated, in coding. It is a very handy tool with limitless possibilities.