I want to get a pancake lens for my NEX. Which lens would you recommend in terms of picture quality?
This is really a simple one, and you can find the answer in most reviews. They're close enough in focal length that I don't think anyone would take both and swap in the field. Both lenses are okay performers, neither is particularly stellar, and the more 40% expensive one is objectively better. Sony even says so, listing "superior image quality" as a feature of the 20mm but not the 16mm
If technical image quality is more important to you than size, you may want to consider the Sigma 19mm as well. It's not an optical paragon either, but it's in the same ballpark as the Sony lenses and better in some ways, for less money than even the cheaper of the Sony pancakes.
But, don't write the field of view completely out of the occasion. The wider 16mm lens includes over 50% greater area in the frame than 20mm, which is a meaningful difference which may outweigh the image quality consideration.
Again, neither of these lenses are optically amazing, and if you obsess over that too much, you're in for disappointment. Either, however, could help you take amazing photographs: focus on that.