For example, suppose you are trying to predict the price of a stock. If the price of the stock is 1000 and the output of the net is 995 or 1005, yielding the same difference of 5, that is a tiny error. You don't want the net to treat those two differences as equally important. By taking logarithms, you are effectively measuring errors in terms of ratios rather than differences, since a difference between two logs corresponds to the ratio of the original values. Less importantly, smooth functions are usually easier to learn than rough functions.
Generalization is also usually better for smooth functions.
For classification problems, you want the class boundaries to be smooth. But if your software does not provide a sufficient variety of error functions, then you may need to transform the target so that the noise distribution conforms to whatever error function you are using. Note that what is important is the distribution of the noise, not the distribution of the target values. The distribution of inputs may suggest transformations, but this is by far the least important consideration among those listed here. Arctan usually works better than tanh, which squashes the extreme values too much.