I have seen in many SMPS there is a Y cap placed between AC ground and DC ground. What is the need of this Y cap?
The high frequency switching used in the SMPS can inflict some quite considerable high frequency common-mode noise on the DC output. This is due to the interwinding capacitance of the internal isolation transformer (aka flyback transformer).
To reduce this noise (and obtain EMC approval) requires that the DC output is either grounded or capacitively connected to ground. In most cases, connecting a Y cap between the DC output and AC side of the SMPS can achieve this.
The downside is that you can see quite high AC power frequencies on the DC output but these "arrive" via the Y capacitor so are easily "extinguished" when there is a load on the DC output that has reasonable capacitance to ground.