OK so there's really two separate issues here...
#1 is did the administration negotiate with terrorists for Bergdahls release? Looks like it... but so far I'm giving them the benefit of the doubt on this for a couple of reasons. They had to know what it would look like to everyone, so why do it? It's one guy... yeah, they're saying "no man left behind" and all that jazz... that ain't the reason. I suspect it's either that the Taliban threatened to kill him and/or they have some op going on with one or more of those 5 guys they released.
#2 is did this guy desert? Based on everything I've seen, looks like it. Does that mean we shouldn't have tried to get him back? No. Should he be punished if that's the case? Absolutely.
Sometime after midnight on June 30, 2009, Pfc. Bowe Bergdahl left behind a note in his tent saying he had become disillusioned with the Army, did not support the American mission in Afghanistan and was leaving to start a new life. He slipped off the remote military outpost in Paktika Province on the border with Pakistan and took with him a soft backpack, water, knives, a notebook and writing materials, but left behind his body armor and weapons — startling, given the hostile environment around his outpost.