Apps must be available on the App Store or the Mac App Store by May 1, 2012 to be eligible for an award—software not sold this way does not qualify. According to the WWDC 2012 Awards website, nominees should be well designed, state of the art, and innovative. Apple also states that the number of nominee submissions for an app does not influence the chances of winning. An app doesn’t even have to be nominated to win, though with thousands of apps in the App Store and Mac App Store, a nomination probably helps call attention to an app for the judges.
While you need a WWDC ticket to attend the award ceremony itself, you don’t need to attend the conference to win. Winning an award can be provide a nice little promotional boost; the winners are featured on Apple’s website (here are last year’s recipients), and they get bragging rights that they can use for marketing purposes.