It depends on the state, but wearing a MAGA hat in the polling place is probably a misdemeanor at least in some states. For example, wearing “a badge, insignia, emblem, or other similar communicative device relating to a candidate, measure, or political party appearing on the ballot, or to the conduct of the election, in the polling place” is a misdemeanor in Texas.
From CT Post:
Make American Great Again apparel or any other slogans Not prohibited
The only prohibition is having a candidates name or likeness, according to Gabe Rosenberg, spokesman for the Connecticut Secretary of the State.
Slogans are fair game. So yes, if you go to the poll center wearing a Make America Great Again hat....you will be allowed in without having to remove or cover your accessory.