Why Micro-controller Pin is connected to ground via Capacitors?
Vref usually means the reference voltage output of the built-in ADC (or DAC, or analog comparator). A reference voltage circuit is basically a very low current voltage regulator (a poor power supply, but very stable). 

Components like ADCs are "using" voltage from this regulator (drawing current). Capacitance on the output of regulators helps to improve stability and reduce noise.

You can think of those capacitors like regular decoupling capacitors on the output of an LDO.