It depends.
PNG is better for crisp images with a low number of colours,
JPG is better for a low-bandwidth image – however it is not as crisp and therefore not very good for GUI.
Generally, JPG is for photos and pictures, whereas PNG (or GIF) is for layout.
You may find this page interesting, as it goes over the basics of PNG vs GIF.