Decreasing Voltage of Power Supply via voltage regulator without using input/output capacitors
From the datasheet we read that the input capacitor is required if regulator is located an appreciable distance from power supply filter. If you are sure that there is no "too much noise" (to say in simple words) between your PSU and the 7812 you can avoid it.

Also, it is recommended if the output capacitance is large. 
Looking at the internal schematic of the circuit I suppose that is recommended to protect the input stage; I hope someone could confirm or correct this statement. 

Although no output capacitor is need for stability, it does improve transient response.

These informations came from ST and Panasonic datasheet.
Sometimes datasheet are a little obscure, sometimes explain things very well. ;-)

UPDATE 2016-05-11:
In old regulator output capacitor was used also for stability purpose, but in modern datasheet this is no more required.
Today I found an interesting (and OLD) document: NEC - Usage of Three-Terminal Regulators