In a narrow ruling that preserves much of the presidential recess appointment power, the Supreme Court struck down President Obama's 2012 recess appointments to the National Labor Relations Board. The court was unanimous in its judgement for Noel Canning, who challenged the president's decision to fill vacancies on the NLRB, even though the Senate was holding "pro forma" sessions to prevent the president from using that power. 

However, the court did affirm that the president is allowed to fill vacancies during intra- and inter-session breaks, as long as those breaks are long enough. And, the Supreme Court ruled that those vacancies may open up either before or during a recess in the Senate. Both of those questions were challenged in a kind of astonishing ruling from the D.C. Circuit, which — as MSNBC explained — held that the president could only use his recess power between sessions of Congress (and not during short breaks), and only if a vacancy opened up during that recess. 

The recess appointment power has a long tradition of being used by both parties to work around a Senate in opposition to the president. With today's ruling, the president may only make recess appointments after the Senate has determined it is in recess, and not, as happened with the NLRB appointments, when the president decides that the Senate is in recess. In other words, the President retains the broad scope of his or her recess appointment powers as it has been historically used until this case, and Congress retains its ability to keep itself open for business (even on paper only) to block the president from using that power.

Here's part of Justice Breyer's opinion for the majority, explaining their narrow approach to today's decision: 

The Recess Appointments Clause responds to a struc­tural difference between the Executive and Legislative Branches: The Executive Branch is perpetually in operation, while the Legislature only acts in intervals separated by recesses. The purpose of the Clause is to allow the Executive to continue operating while the Senate is una­vailable. We believe that the Clause’s text, standing alone, is ambiguous. It does not resolve whether the President may make appointments during intra-session recesses, or whether he may fill pre-recess vacancies. But 
the broader reading better serves the Clause’s structural function. Moreover, that broader reading is reinforced by centuries of history, which we are hesitant to disturb. We thus hold that the Constitution empowers the President to fill any existing vacancy during any recess—intra-session or inter-session—of sufficient length.

It should be noted that Justice Scalia, joined by the conservatives, concurred in the judgement of the court, but took the unusual step of reading his separate opinion from the bench. Scalia, it seems, wanted the court to take a narrower interpretation of the clause, saying "The Court’s decision transforms the recess-appointment
power from a tool carefully designed to fill a narrow and specific need into a weapon to be wielded by future Presi­dents against future Senates."

The full opinion is here.