Looking up the prize, it's supposed to go to
the person who during the preceding year [...] shall have done the most or the best work for fraternity between nations, for the abolition or reduction of standing armies and for the holding and promotion of peace congresses.
(I'm quoting Wikipedia here, but I doubt they'd get that wrong.)
The key words there being "the most or the best" - if we get a year where there's no obvious choice, SOMEONE has to get it, and it has to be based on their actions that year. They may have decided that there simply wasn't anyone of Gandhi's or Mother Teresa's caliber this year, and Obama's efforts, while they've achieved little thus far, do satisfy the criteria, especially the "holding and promotion of peace congresses", which is certainly something that very much distinguishes Obama from Bush.
The specific words they chose in awarding him the prize were:
for his extraordinary efforts to strengthen international diplomacy and cooperation between peoples
That is a major trait of his foreign policy, so they clearly didn't just pull it out of their asses.
So, there's 2 ways this can be invalid:
1. There's a more worthy recipient. I can't think of a super obvious name here, so while Obama is a weak choice, I'm not sure there actually was a better one. AFAIK, no serious progress was made in the middle east in the last year, no major diseases were cured, no dictatorships fell, no wars were ended... I really can't think of any case where one person did something hugely significant to award the prize on, so they have to settle with the best they can get. Obama's a rather weak choice, but the question isn't whether he was a weak choice, it's whether they were was a better one. I honestly don't know... I WANT to believe there is, but I certainly can't think of one.
2. He stands against the criteria the prizes are awarded on. You could certainly argue that sending more troops to Afghanistan is hardly "reducing standing armies", but then if the goal is to get all troops out of Iraq, while increasing troops in Afghanistan by a smaller amount, the overall balance is actually a reduction. Of course, he doesn't seem to be doing anything to speed up Iraq withdrawal, so this could be an issue. Gitmo he neither started nor made worse, so I don't think he can be DQed for that - although this is another thing that could make another candidate stand out more. Continuing warantless wiretapping is certainly a black mark on his record, but then at the same time he's protected net neutrality and he's improved government transparency... perhaps they decided these cancel out? There's certainly places to criticize, but I don't see anything Kissinger-level.
As Oars has pointed out, there's been a lot of controversial choices, the Kissinger one especially, which actually caused 2 of 5 committee members to resign.
Gandhi actually DID get one, but posthumously (see the Wikipedia article or the peace prize site.)
So... I think some of the choices for the prize have been terrible, but I don't think it's happened so often that it's a farce.
So, in the absence of any giant red "you can't give it to someone who did X!" and the absence of anyone suggesting a better choice, I can see why they'd pick Obama, although I really, REALLY hope they missed someone. If what he did really was the largest move towards world peace in the last year, we've got issues.