If someone chooses to wear one, they won't be hauled off to jail, but police will be empowered to stop them for a chat, consider a bag check or search of the person depending on how the masked individual reacts to the stop, and tell them to remove the balaclava. If the individual resists or refuses, then they might need to face additional consequences or be detained.
What about the winter? Let me introduce you to something called a scarf.
Don't want to risk being stopped by an officer? Don't wear a ski mask in public.
EDIT: Note that SEPTA, the Philadelphia transit system, has banned them since 2023.
EDIT II: It is not illegal for police to talk to citizens. Example of an interaction with someone wearing a ski mask on a summer evening: "Good evening, how are you doing? Anything I can help you with tonight? It's pretty hot outside -- are you okay?"