What file format should I use for rendering?
Animation

It's generally good practice to render to an image sequence first, then combine all the images into a video format after the render is complete. This allows for the render to stop (whether the result of a crash or just canceling the render to use the computer for something else) and still be able to resume by setting the Start frame to the frame after the last rendered and restarting the render.

See my answer here for details.

Stills

As a personal preference I use PNG as a kind of default, but each format has it's advantages. The format you use will also depend on what kind of data you need to keep and how much disk space you can spare.

See the wiki for descriptions and a list of supported image formats:


  
  BMP    Bit-Mapped Paint loss-less format used by early paint programs.
  Iris  The standard Silicon Graphics Inc (SGI) format used on some Unix OS machines. 
  PNG    Portable Network Graphics, a standard    meant to replace old GIF inasmuch as it is loss-less, but supports    full true color
  images. Supports Alpha channel.
  
  Enable the RGBA button to save the Alpha channel. 
  


The RGBA option is in Properties > Render settings > Output:




  
  Jpeg  Joint Picture Expert Group (name of the consortium which    defined it), an open format that supports very good compression with
  little loss of quality. Only saves RGB values. Re-saving images
  results in more and more compression and loss of quality.
  Jpeg 2000
    Uses the Jpeg 2000 codec. 
  TARGA and Targa raw    Truevision Advanced    Raster Graphics Adapter is a simple raster graphics format
  established in 1984 and used by the original IBM PCs. Supports Alpha
  Channel.
  
  Enable the RGBA button to save the Alpha channel. 
  Cineon    format produced by a Kodak Cineon camera and used in high-end    graphics software and more directed toward digital film.
  DPX    Digital    Moving-Picture eXchange format; an open professional
  format (close to    Cineon) that also contains metainformation about
  the picture; 16-bit    uncompressed bitmap (huge file size). Used in
  preservation.
  MultiLayer    an OpenEXR format that supports storing multiple layers    of images together in one file. Each layer stores a render
  pass, such    as shadow, specularity, color, etc. You can specify the
  encoding used    to save the MultiLayer file using the codec selector
  (ZIP (loss-less)    is shown and used by default). 
  OpenEXR    an open and non-proprietary    extended and highly dynamic range (HDR) image format, saving both    Alpha and Z-depth buffer
  information.    Enable the Half button to use the 16-bit format;
  otherwise 32-bit floating point precision color depth will be used.
  Enable the Zbuf button to save the Z-buffer (distance from camera)
  info.
         Choose a compression/decompression CODEC (ZIP by default) to save disk space.
         Enable the RGBA button to save the Alpha channel.
         Because OpenEXR is so new and previews are generally not supported by Operating Systems, enable Preview to save a JPG image
  along with the EXR image so you can quickly and easily see what the
  basic image looks like. 
  Radiance HDR  a High Dynamic Range image format that can store images    in floating point (with light brighter than 1.0) - 32bits
  per    channel. 
  TIFF   Often used for teletype and facsimile (FAX) images.
  


Some further notes on a few formats:


PNG: PNG (Portable Network Graphics) is a lossless format, meaning that the data can be reconstructed exactly as it was before being compressed. PNG supports true color color depth. Blender also supports 16 bit PNG, which gives a larger range of possible colors.

Because PNG is lossless, the Compression slider in Render settings > Output only affects the file size (AFAIK, the only disadvantage to setting it to 100 is it might take more CPU time to compress/decompress)

As an example, I saved two pngs, one with 100% compression and one with 0% (Uncompressed). The uncompressed png is 2MB, and the fully compressed png is 18.7KB. The images are identical.
JPEG: JPEG is a lossy format, which means that data can not be reconstructed exactly as it was before being compressed. (see a comparison to PNG here) However, as a result JPEG takes up a lot less file size.

Instead of a Compression slider there is a Quality slider when JPEG is selected as the output format. This refers to how closely the decompressed image resembles the original uncompressed image.

Here is an example. The left most image is a fully compressed PNG (36.3KB), the middle image is 100% quality JPEG (20.3KB), and the right most image is a 0% quality JPEG (8.5KB). At 1:1 they seem pretty much the same, but when scaled up the differences are more noticeable:

 
OpenEXR: EXR Is a format for HDR (High Dynamic Range) floating point images, and is capable of storing deep color depth of 32 bits per channel. Blender supports Half precision (16 bits per channel) and full precision color depth EXR images (32 bits per channel). As a result, these files can get quite large, especially when using Multilayer EXR). For example, a 201x167 image saved with lossless ZIP compression is 199.1KB

These images are good for keeping every bit of data around (including render passes in the case of Multilayer), which can be useful for compositing.




Note that when rendering a still, the image is stored uncompressed in memory, so you can render an image then save it multiple times in different formats (with different compression ratios).