Think for a moment where we find ourselves when we want to explain something to someone else. If we set out to do this in writing, we are composing what is called expository prose, sentences and paragraphs designed to expound a subject cleanly and clearly to a particular reader for a particular purpose. A good explanation involves organization, grouping facts and ordering the groups, and that is the role punctuation plays.
The three chief marks of punctuation are the comma, semicolon, and period, each in this order having a degree more strength than the mark before it: the weakest of the three is the comma; a semicolon is stronger than a comma but weaker than the period (ingeniously invented by placing a period directly over a comma); and the period the strongest (known, also appropriately, as a full stop). There are a few other pieces to the game, one of which, the parentheses, can upset the board when one of these three basic marks is involved.
Take, for example, a sentence like this: Over the years she had made a number of smart real estate investments across the country: a modest first home (Illinois), a summer cabin (Wisconsin), and a retirement condo (Florida). In addition to the comma and period, this sentence employs parentheses to isolate certain information which, though helpful to the reader, stands outside the syntax that holds the statement together. This triad of specific geographic locations is part of an entire wing of the sentence introduced pointedly by a colon, on which the entire thirty-word statement (sixteen words before the colon and fourteen after it) balances nicely. That combination of proportion and balance communicates a sense of meaningful organization, and from that arises the strength of clarity.
The use of the parentheses in this sentence, though, poses a mechanical question: where should the comma go, before the closing parenthesis or after it? The term mechanics applies in language study to the technicalities, or machinery, of a sentence—punctuation, capitalization, and formatting. Many (but not all) of the answers to these questions are determined by custom and convention with good reasons behind them, and those rules are gathered up in what are called style manuals. One such guide is The Chicago Manual of Style, along with other authorities such as the Modern Language Association Handbook and the American Psychological Association Manual. Each of these manuals has an audience in mind, and that determines in great measure the answers they give to these common mechanical questions. The way to proceed, then, is to choose one manual and be consistent across a document.
So in answer to our question whether the comma should sit before or after the closing parenthesis, The Chicago Manual of Style, Sixteenth Edition (my choice of style guides) maintains that a comma, semicolon, or colon should not precede the closing parenthesis, the thinking being that these marks have to do with the larger sentence in its entirety, not just with the parenthetical matter. (And for that same reason, a question mark or an exclamation point can lie within the parentheses if they are part of the parenthetical matter, or outside if they belong to the larger sentence itself.) Thus the punctuation in our example sentence is correct because the commas are meant to group the phrases, including the states named in the parentheses of each.
Style guides are not beach reading, and so the better way to use them is to know exactly what you’re looking for and go to the index first. A little experience will help you learn which indexing term to look for, but you’re well advised not to search too long in other directions after you find the specific answer you need. The subject is vast with a thousand subpoints, each of which can be dealt with as they arise in your writing. Otherwise, the day will pass all too quickly over that sunny beach.