The relation is called $f$ sends $a$ to $b$. However if as you note in a comment $a\mapsto b$ is written in a context with no relation to $f$ (or any other specified function) then it is perfectly meaningless. There is always some function that sends a given element $a$ to a given element $b$, so this is telling you nothing. One can invent artificial situations in which this would have a meaning; for instance if one is discussing the functions $\{a\}\to B$ then $a\mapsto b$ selects exactly one of them, or one could announce that $a$ is a variable ranging over $A$ while $b\in B$ is a constant, in which case this specifies the constant function with value$~b$.
What is much more common that left of "$\mapsto$" one writes a variable ranging of some specified domain, and to the right of it some expression involving that variable. For instance $x\mapsto 2x^3-4x^2+7$ describes a function once the domain and codomain are separately specified; thus this notation allows introducing a function without having to introduce a name for it, which is the "anonymyous function" that Asaf refers to in a comment.
To answer the addition to the question, I don't think $a\mapsto b$ has any conventional use in the context of formal grammars. One can imagine using it in writing production rules, but again $b$ would usually be replaced by a more elaborate expression, and even then I think it would be mostly confusing, especially since there may be multiple production rules with the same left hand side but different right hand sides.