Doorbell transformer - Installed in panel -doesn't work when green is connected?
Follow the Instructions
The instructions say:

For metal junction boxes, it is required to connect the green ground wire from the transformer to the metal junction box or clamp it to the metal conduit.

If it doesn't work when connected properly then either you have something very strange going on in your panel or the device is defective.
The fact that the instructions actually say this, rather than &quot;nothing&quot; or &quot;the green wire is only required if you are not installing the transformer on a grounded metal junction box&quot;, means that you need to do it for a proper installation. End. Of. Story.

Ground != Neutral
...except when it is :-)
In a perfect world (electrically speaking), ground would only ever be used for two types of current: device/wiring fault and external current (e.g., static discharge or lightning). In order to make everything work properly, ground is bonded to neutral at one place, typically the main panel.
For a bunch of historical reasons (e.g., separate ground wires have not always been a thing), there are a bunch of situations where there used to be, and in some cases still are, ground and neutral together at the device.
However, there is no requirement that ground and neutral be the same and be connected in a device. But there is, generally, a requirement that each device have a ground connection. (There are exceptions - double-insulated tools, simple devices such as wall warts or lights, etc.) With many devices, the case or exposed metal parts of a device will be connected to neutral, whether or not there is a separate ground wire. However, it is quite possible to build a device which has ground to the case (for safety) but which does not connect that ground to neutral because doing so would make the device not work properly. A transformer is a simple example of such a device.
End result: If you have separate ground and neutral connections (screw terminals or wires) on a device then you do not connect them both to neutral unless the directions tell you to do so. Doing so when not appropriate may cause the device to not work (no harm done) but may be deadly.