The glass windows have the peculiar property to pass radiations which have wavelength near to the visible light or shorter wavelength' It does not allow infra-red radiations of higher wavelength. Since the sun sends infra-red radiations of lower wavelengths, these pass through the glass windows and gets trapped inside the car in the form of heat. This heat or infra-red radiations cannot pass out and thus gets trapped in the car for the longest time, making it hot from inside