Yeah, like any clothing item it just randomly shows up at Able Sisters. They sell I believe two different hats per day, and there are a lot of hats, so you'll likely have to wait a while for a crown to show up. Just keep checking every day. Oh, and it costs 1,000,000 bells, so make sure you're saving up!
There's also the royal crown, which is much more ornate and costs 1,200,000 bells - the most expensive item in the game. It too shows up randomly in the hat section.