Postdoc position: should I stay for one year or two years?
Two.
In the United States, at least in computer science, most postdocs are synchronized with the academic calendar. A typical postdoc starts in August, and faculty application deadlines start in November. So for purposes of applying for faculty positions, a one-year postdoc is really only three months long. A two-year postdoc gives you five times as much time to strengthen your faculty application!
One year is not very long. You will lose some time at the start while you settle in and get 'set up' for doing research; you will lose more time at the end as you make preparations to move on. You also need to factor in time spent on securing your 'next job'. I would therefore strongly encourage you to take a two-year position rather than a one-year position, all else being equal.
Remember, it's generally much easier to resign a position before the money runs out than it is to secure an extension!
As this question may receive more attention over time - and it deserves that - I'd like to add a more wider scope to it.
There are reasons why one year is fine for a post-doc. For example, if you are going to work in a very similar area as you did your PhD in and since then it may take only little time to familiarise yourself with the research. If you are staying in the same country, settling in will be minimal. It might also be that you are working on a very concise subject and a year would completely suffice. You might also think about doing another post-doc somewhere else, then you probably want to consider a shorter period, as it allows you intensify your professional network.
You should always also keep in mind, that a post-doc might not work out as you expected it. Going for only one year is a safe bet then. In most cases however, since you are a professional, there will be workaround for this problem.
There are probably many more reasons to choose the longer period. Most of them were already mentioned by avid. Sometimes doing a post-doc is leaving the comfort zone, i.e. you are working much more freely than during a PhD and probably working on something completely new. Settling in is probably the biggest worry you will have. You may be wasting a lot of time in that procedure - very much depending on where you go, there might be a lot of paperwork involved. If you are planning on going abroad, this may take ages. When I started my post-doc I had about a month before I actually could start with my research. It might also take time to get yourself acquainted with the local infrastructure and/ or command structure.
When you finally started your research there might occur other problems along the line. Distractions you cannot plan, for example you might have more responsibility in many more related fields. Most likely PhD students and undergraduates of your new research group will ask your advice often. If you are the only post-doc, you are the go to guy, when your advisor is not around.
Another point to consider is cooperations with other groups, writing manuscripts, attending conferences, developing new research proposals, maybe write a grant application, prepare for your future plans. But apart from this all, a key role in the beginning will also be socialising, become part of the group, member of the faculty/ institute. (I underestimated that a lot when I started - there was a lot of "shake-hands" involved.)
During a post-doc, you should be able to develop yourself, your methods, your profiles. You are already a contributing member of the science community, keeping that up is a lot of work. That all only works if you are comfortable with your surroundings and make the best time you can possibly have. One year might have flown by, without you realising that.