What formats to use to store data in?

Imagine creating your own application or game. When you first start out, you may keep and generate your data in code. As you progress you may find how inefficient and cumbersome this turns out. Now you want to move all that to external files, but what format should you use?