There is some solid research around how humans are prone to underestimate the time it takes to do any task. This effect is called the planning fallacy, and the good review paper is by Buehler, Griffin and Ross This is, obviously, of great interest and concern to any programmer or project manager.
There has also been research on how to mitigate the planning fallacy. Buehler suggests thinking back to when one performed similar task in the past dramatically increases the accuracy of an estimate. Justin Kruger and Matt Evans show, in a paper titled “If you don’t want to be late, enumerate” that breaking down a task into its component parts is a very good strategy for accurate estimates.
All this provides good support for the typical agile planning process. Focussing on retrospectives and task breakdowns are indeed what we should do, and this is now supported by science!
However, another piece of research by Buehler, Messervey and Griffin show that people working in groups are much more likely to have unrealistic expectations on project times.
I think this aligns well my anecdotal observations of groups of developers in a planning game trying to estimate stories. Coming up with estimates in a room full of other developers is not a very productive exercise. Developers should instead always consider their stories for the iteration, and prepare a task breakdown and an estimate, before they come into a planning game. The planning game should then be about working with the business owners around prioritisation and planning.