What is the purpose of the glazed round area atop the Ju 87 Stuka G?
(Source) Ju 88 model.

Not just the 87, some Ju 88 models also had it, with no access to it in-flight. As mentioned, it's an antenna. The antenna is part of the EZ6 direction-finding unit.

The glass is not for viewing. It's the construction method to keep the installation as thin as possible. The sense antenna is painted on the glass.


  The PRE/6 ferrite antenna for the EZ/6 was extremely flat so that it could be mounted in a 10 cm deep "tub". The lid of the tub was a plexiglass cover with a star shaped sense antenna sprayed on. The plexiglass cover would sit flush with the aircraft skin so that there would be no air resistance from the antenna (unlike the earlier loops used with the EZ 2). (Source)


(Source)

(Source) The EZ6 unit with its different components put together by a serious hobbyist. In the glass box you can see the rotating antenna, and the thin sense antenna on top.