JPG suits photos. It makes files small, but loses a little quality when saved, and blurry noise can appear around text and lines.
PNG is lossless, so text, lines, charts and screenshots stay crisp. The trade-off is that files are larger than JPG. For photo-heavy PDFs, or if you need smaller files, use PDF to JPG instead.