How this capacitor discharged by leakage of the diode in peak detector circuit...?
This is a peak detector circuit.  The capacitor is indeed discharged by the diode leakage current but the discharge rate is very slow, hence a very small value capacitor should be used.  Reverse-biased (voltage blocking) diodes have non-zero leakage current, typically measured in nA (1N4148 has ~ 25 nA leakage current).  My suspicion is that the capacitor leakage current (self-discharge) is similar to the diode leakage current.  This parameter really depends on the capacitor specs (http://www.murata.com/en-us/support/faqs/products/capacitor/mlcc/char/0039).

Look at this Microchip application note:  http://ww1.microchip.com/downloads/en/AppNotes/01353A.pdf

It states that the only discharge path is through the diode leakage currents and opamp bias currents (page 9).  Sometimes a parallel resistor is added as well as shown in the application note.


  But leakage current is flowing inside the diode then how does it seems to discharge the capacitor


The opamp can sink the current flowing through the diode from the capacitor. Opamps can source or sink current through the output pin.

Below is a snapshot showing the circuit input and output.