How can I render all render passes to files in Cycles?
Render OpenExr Multilayer for Blender, Nuke and Natron. Go to the Scene Tab, enable all passes  which key for compositing and set the Output Format in the Render Tab to OpenExr Multilayer.





Blender automatically writes all enabled passes and layers as single channels to the EXR as expected. 

For After Effects and Fusion I'd suggest render single EXR's. For more information on rendering passes and layers as EXR's, see: Save all render passes to a single EXR image. 

Note: If you want to use Index Passes (IndexOB or IndexMA) see this answer: How to use index passes in other compositing packages?