MacBook Pros—at least the Retina display ones—have a built-in HDMI adapter, which works perfectly for driving an external monitor with a native resolution of 4K (2460✕1440). However MacBook Airs only have a ThunderBolt port, so you'll need an adapter.
I started with a standard ThunderBolt (or mini DisplayPort) to HDMI adapter, but the resolution peaked at HD (1920✕1080). I wasn't sure if it was the adapter, the monitor, or the MacBook, so I tried swapping out all 3.
From that, I discovered that a mini DisplayPort to DisplayPort cable was the only configuration that worked reliably. Of course this means you need to get a monitor that has a DisplayPort input. Not all of them do, but thankfully there are enough choices, and even some at the lower end of the price range have it.