JPG for photographs
JPG is widely compatible and works well for photos because it can trade a little image detail for much smaller files.
PNG for transparency and sharp graphics
PNG is useful for logos, UI screenshots and images that require transparency. It can be much larger than JPG for photographs.
WebP for modern web delivery
WebP supports both lossy and lossless compression and is widely supported by modern browsers. Keep source images separately if you need to edit them later.