This handy chart explains, with vivid colors and in fine detail, which image format goes with which kind of use.
The chart does focus only on raster (bitmap) image formats, where information is saved for each pixel. I suppose it makes sense for practical use, but I really wish vector formats caught on better. For now, even standard vector formats such as SVG, are not accepted when uploaded to many tools. WordPress for example.