Engineering & Architect Plans, AutoCAD
TIF is lossless (including LZW compression), which is considered the highest quality format for commercial work. The TIF format is not necessarily any “higher quality” per se (the image pixels are what they are), but there simply are no additional losses or artifacts to degrade and detract. And TIF is the most versatile, except that web pages don’t show TIF files, because some browsers do not show TIF images. For other purposes however, TIF does most of anything you might want, from 1-bit to 48-bit color, RGB, CMYK, LAB, or Indexed color. Most any of the “special” file types (for example, camera RAW files, fax files, or multipage documents) are based on TIF format, but with unique proprietary data tags – making these incompatible unless expected by their special software.
GIF was designed by CompuServe in the early days of computer 8-bit video, before JPG, for video display at dial up modem speeds. GIF is lossless, but it is always an indexed color file (8-bits, 256 colors maximum), and is poor for 24-bit color photos. Don’t use GIF for color photos today, the color is too limited. But GIF is still very good for web graphics (i.e., with a limited number of colors). For graphics of only a few colors, GIF can be much smaller than JPG, with more clear pure colors than JPG). This option is called Indexed Color, see Color Palettes (second page of GIF link below).
PNG can replace GIF today, and PNG also offers many options of TIF too (indexed or RGB, 1 to 48-bits, etc). One additional feature of PNG is transparency for 24 bit RGB images. Normally PNG files are a little smaller than TIF LZW (both use lossless compression, of different types), but PNG is perhaps slightly slower to read or write. PNG was designed relatively recently for the purpose to bypass possible patent restrictions on LZW compression (used by GIF and TIF). That patent situation has gone away now, but PNG remains excellent. Less used than TIF or JPG, but PNG is another good choice for lossless quality work.
Camera RAW files are very important of course, but only for the very specific use. RAW files must be processed to regular formats (JPG, TIF, etc) to be viewable and usable in any way, but RAW offers substantial benefit in doing that. The debate goes on, some cannot imagine NOT taking advantage of the greater opportunities of RAW. Others think any extra step is too much trouble, and are satisfied with JPG – my own biased opinion is they just don’t know yet.