There are many horror stories of how freelancers and agencies have been left out in the cold when it comes to payments from a client, it doesn't happen frequently but that's why many freelancers and agencies aren't prepared for it.
I've found many freelancers and small, newly formed agencies don't have contracts in place when it comes to working with a client. They just expect the client to stick by their word when it comes to payments. Even if the client is the nicest guy you've ever met, you should never go by their word - it's just common sense.
This talk by Mike Monteiro was hosted in March 2011 but it's still very relevant today. Mike and his lawyer give a half an hour talk on how to get your payments, what should be in your contract and what to do when something goes wrong. If you're a freelancer or considering getting into the freelance world, advice like this is invaluable.
If you're unsure about how to write up a contract, check out this post - Free Contract Templates & Legal Resources for Freelancers