Purpose of a capacitor between op amp inputs in buffer circuit
At DC, and low frequencies where the gain and speed of the amplifier is sufficient to keep its inputs at more or less the same voltage, it does nothing, as it's 'bootstrapped out'. 

Any amplifier has a finite bandwidth. If a high speed step is applied to the input, then for a moment, there will be the full step voltage across the inputs. Some op-amps misbehave under these conditions. A small capacitor across the inputs like this reduces that effect. 

In circumstances where there is RF pickup on the input leads, which can also make op-amps misbehave, a small capacitor here can also improve things.

Most applications of op-amps do not have very high speed inputs, so do not need this protection from them. It's usually better to explicitly filter any inputs, rather than use this crude method. However, in the case of an emergency retro-fit, putting a small C directly across the inputs is a convenient improvement.