Because most of the story of Updike's "A & P" takes place in the store, there is less detail about the beach, while there is much more about the store. However, the two have strong symbolic meanings.
Sammy mentions the beach first in terms of being able to see "Queenie" better with the lights in the store, which expose minute details, as opposed to fighting the glare on the beach:
You know, it's one thing to have a girl in a bathing suit down on the beach, where what with the glare nobody can look at each other much anyway, and another thing in the cool of the A & P, under the fluorescent lights, against all those stacked packages, with her feet paddling along naked over our checkerboard green-and-cream rubber-tile floor.
Sammy compares both locations in terms of lighting. Each has the benefit of light, and this is how they are the same. However, the glare on sand and water makes it difficult to see much, especially if we can assume that sunglasses were not in use then as they are today. However, the difference between the two places is that the lights in the store brighten up everything without hindering sight: there is bright light that hides nothing. So while "Queenie" is out of her element (the beach) in her bathing suit and bare feet, Sammy is delighted by how she looks.
Another mention of the beach describes that the town is five miles from the beach. The store is in the middle of the town, quite some distance from a beach crowd, and the women that do shop there having been to the beach, "put on a shirt or shorts or something" before they come in.
In addition, there is not even the suggestion of a beach near the store. It faces a church, the newspaper store, offices, and road equipment making repairs. The store is about as far removed from the beach as the Rocky Mountains: Sammy notes some people in town haven't been to the beach in twenty years.
There is a comical comparison that Sammy makes when Lengel comes into the store from the back and scolds the girls about their attire. Twice he tells them it isn't a beach:
His repeating struck me as funny, as if it had just occurred to him, and he had been thinking all these years the A & P was a great big dune and he was the head lifeguard.
Copyrighted in 1962, there were strict rules about how to dress in public, among other things. The manager's response was well within the norms of society at that time.
The beach is symbolic of a place where the rules of society don't apply. On the beach it's all right to wear a two-piece bathing suit...the same suit that is forbidden in the store. Queenie, and the flash in her eyes as the manager’s censorious upbraiding aggravates her, is symbolic of the rebels in society—those who "buck the trends." And Sammy admires her. He is unhappy that Lengel has embarrassed the girls, and he quits.
The store is symbolic of society as a whole, with the rules that are adhered to, where people come in, shop, do as they are told, and leave. Sammy notices that the customers on the scene become "like scared pigs in a chute," and he perceives them as sheep, as followers.
He knows what the rules are, but he does not admire the "sheep" who so willingly follow them. [In quitting]...he has upset the status quo...
Sammy "votes" for life "according to the beach," and rejects society's norms as demonstrated at the store. At the end he recognizes that this choice will not make things easier for him "hereafter."