Reason behind using DNA primer in PCR techcnique while RNA primer use in replication in vivo?
The (very) basic answer to your question about in-vitro vs. in-vivo primer usage is:


In-vivo - Although either (DNA or RNA primers) can be used for in-vivo primer extension biochemistry, DNA primers are not available (not made) in living cells. Therefore all natural in-vivo primer chemistries utilize RNA primers.
In-vitro - DNA primers are easily synthesized, inexpensive, functional, and substantially more stable (less likely to be degraded). DNA primers are therefore primarily used for most in-vitro purposes (i.e. PCR and other in-vitro primer extension applications).


Beyond that, all other reasons (complex evolutionary reasons vs. human choices in-vitro); involving subtle differences between RNA and DNA chemistry, structure, and function, similarly can play a role. The links below may be helpful to address some of these differences.

https://en.wikibooks.org/wiki/Structural_Biochemistry/Nucleic_Acid/Difference_between_DNA_and_RNA

https://en.wikipedia.org/wiki/Primer_(molecular_biology)