Except for the opening scene in San Francisco, The Birds is set completely in Bodega Bay, a real town on the California coast about an hour north of San Francisco.
Bodega Bay is useful as a setting for a couple of reasons.
First, in 1963, it was somewhat remote. If you had a bird attack in New York City, you'd have the entire nation on alert in a flat second, with the Army flying in with bird buster bombs and scientists flapping up out of the woodwork to study the mess and develop anti-bird measures. In Bodega Bay, though, it takes a while for word to get out that deadly birds are attacking and destroying everyone in their path. So, for pure horror-film logistics, Bodega Bay is a good place to put the action.
Bodega Bay is also set up as a contrast to San Francisco—particularly as a contrast to Melanie's big-city socialite ways. The film mentions that Melanie has been tossed naked into a fountain in Rome; this shows she's sophisticated, cosmopolitan, and of questionable moral fiber. She could be seen as a corrupting force as she comes with her fur coat and high heels and her lovebirds to flirt with Mitch. The small-town atmosphere of Bodega Bay makes Melanie look different and suspicious.
Having the action set in a beach town was also a way for Hitchcock to make sure that he had plenty of uninterrupted sky vistas for the film.
It's about birds, after all.
There was nothing in Bodega Bay but flat land; nothing to get in the way of the views. The only problem was that it was too sunny and cheerful. The artists and camera operators had to work hard at creating a gloomier atmosphere.