Opening windows when using a cool mist humidifier prevents the problem of too much humidity, which can cause dangerous mold growth. You can tell if the humidity is too high if condensation forms on the inside of windows.
Keeping Windows Open
Keeping Windows Closed
Whether it is the cool mist or vaporizing heat type, manufacturers design all humidifiers to add moisture to the air in a confined, specifically sized area (e.g., a room or a whole house for a large unit). Keeping the windows closed keeps the unit functioning properly.
Running a humidifier with open windows may reduce humidity in the room, but it does so by allowing the moisture to fly out the window. It wastes energy by adding moisture to the outside air as well the inside. This is analogous to opening the windows while running an air conditioner. If the humidifier is putting enough moisture in the air to form condensation on the windows and risk mold formation, the humidifier is intended for a larger room and you need a smaller unit.