If you double click an application direct from a .dmg such as firefox that doesn't run through any installation set up (such as the install screen asking where to install it) then you are running it from the .dmg. Once you delete the .dmg you loose the ability to use the software (firefox in this case) as the destination path no longer exists for it. By dragging it to your apllications folder and then placing Firefox on your dock from the apllication folder (damn that was long winded) you are running firefox from the applications folder and not the .dmg. That way you can delete the .dmg and not worry.
Step by step.
1. Mount the .dmg
2. Drag Firefox to applications folder.
3. Unmount .dmg
Go to applications folder and place Firefox on your dock by dragging to the dock from the app folder. (you don't have to do this if you don't want Firefox in your dock.
4. Delete .dmg as it is unnessacary.
One thing I always do is keep .dmg's like Firefox, messenger, azureus and other very common ones on a separate drive so when I come to reformat my computer I can just install them from the dmg's instead of searching the internet and re downloading the whole lot. But thats just me.
Hope this helps.