Transparent Image different in viewport than render
If you need to produce a PNG file you have to know that the format uses "unassociated" alpha.

That means that the program that will do the compositing will "pre-multiply" foreground's RGB*alpha prior to adding it to the background plate.

This is important to know because it means that every pixel with alpha=0 will lose its RGB data (because multiplying anything by 0 gives 0).

Associated alpha, as explained here, allows you to have pixels that are both emissive and fully transparent, but that kind of information can't be expressed in a PNG file.

In order to transfer the the result of your render to a usable PNG output you'll have to cheat and pull an alpha from the RGB data, taking care of the light parts and the dark parts in two different steps.

Instructions:

1) First, do an alpha over on white, the result will show only the dark parts.

2) Then do another alpha over from the original render, this time on black. That will reveal only the light parts.

3) Now, invert the result of the first alpha over.

4) Using a mix node set to SCREEN, mix the result of the second alpha over with the inverted result of the first alpha over. That will be your alpha channel.

5) Take the output of your second alpha over (the composite on white) and using a mix node set to divide, divide it by the alpha created in the step 4.

6) Plug the pre-divided plate from step 5 into the "image" socket of the composite output, and plug the alpha channel produced in step 4 into the alpha socket.



That will give you a reasonable unassociated PNG output.
It won't be perfect as the unassociated alpha format is very limited for advanced compositing, but it will do the trick.

Anyway, ALWAYS REMEMBER that associated alpha is the one true alpha, and allows compositing effects that are impossible with unassociated. This means that PNG isn't an adequate format for vfx compositing and a format that allows associated alpha should be chosen instead.
If the program where you're going to composite these plates allows associated alpha always prefer it over unassociated.