To ask specifically: my grandmother occasionally brought up Karl Emil Nygard, the communist mayor of Crosby, Minnesota (near to where she grew up,) but never had much to say on the political ramifications of him being elected or what happened afterwards.
More generally: were there other Communist politicians in the United States? What did they do and how were they viewed?
It depends what you mean by "Communist." If you mean official member of the Communist Party of the USA while in office, I can't think of a single politician -- other than Nygard, whom you mention here -- who qualifies, but there may well have been several who are below my radar.
If you mean someone who was a communist in terms of political and economic philosophy and who openly sympathized with communism either in the US or abroad, a couple come to mind:
John Bernard was a U.S. Congressman from Minnesota's 8th Congressional district, the same district that contains Crosby, where Nygard was mayor. Bernard was elected as a member of the Farmer-Labor party during a massive sweep of that party to Congress from Minnesota and other parts of the Midwest, but he was an avowed communist, going so far as to insert articles from communist newspapers like the Daily Worker into the official congressional record. He eventually became an official Communist Party member in 1977
Dan Hoan who was mayor of Milwaukee for 24 years between WWI and WWII. Although not an avowed communist, he was elected as a member of the Socialist Party and associated with Marxists -- and was wont to cite Marxism-Leninism as a model for purging corruption (which was a huge problem in Milwuakee government at the time he was in office). He eventually became a Democrat after his alliance with the Marxist and other far-left elements in the Socialist Party worked against him in forming a coalition, and lost him their nomination for mayor.
As for what they accomplished: Bernard only served a single term in Congress, and I'm unaware of any significant accomplishments in which he was involved. Hoan remains Milwaukee's longest serving mayor (and was succeeded by another socialist), and actually did have a good effect on reducing the corruption and graft at city hall by most accounts. There is a bridge named after him in the city today.
There were, of course, many "politicians" who were members of the Communist Party of the USA and ran for office but never had any real chance of winning. If you'd like me to talk about some of the more well-known ones, I'd be glad to do that.
Sources: