Answer
Polarization is a method of restricting different plane of transverse waves into the required plane.
Polarization process is done with the help of Polaroids. Polaroids are kept at different angles, these angles are selected according to the wave requirement. Polaroids allows only waves which are aligned to it.
so, this phenomenon is the same in case of polarizing sunglasses as it restricts the unwanted sun waves to pass through it.