It's hard to predict really. When unlocks were harder to come by and much more expensive, an unlocked iPhone would definitely get a much higher resale value (sometimes $100 or more) than a locked one.
Now, the difference can be far, far less, almost negligible sometimes. With carrier unlocks for AT&T iPhones available for $2-$3, Sprint doing it for most people for free*, and Verizon's phones coming unlocked right out of the box, the difference in value isn't there right now. You might get a few bucks extra for an aready-unlocked iPhone, if you get a buyer who's either too lazy or clueless to figure it out for themselves.
That said, it still makes sense to unlock an iPhone if you can, as soon as you can. You never know when sources for unlocking phones might get forced to close up shop for regulatory or other reasons, at which point the value of an unlocked iPhone could skyrocket again.
*Note: Sprint only unlocks for international carriers. Under no circumstances can you carrier unlock a Sprint iPhone for US use outside of Sprint. Only way to do that is with a jailbreak or
Gevey SIM, both very clunky solutions. So inherently, Sprint iPhones probably have less resale value because of this.