Context matters. Saying "Liberals are lazy and want handouts" should be unacceptable; saying "Liberal ideology encourages laziness and lack of motivation in citizens" is more acceptable, and gives a basis for arguing the ideology instead of how bad the people who subscribe to that ideology are. "Islam is a religion that oppresses women and minorities" criticizes Islam; "Muslims are barbaric and backward" is a generalization that can be proven false with even one example of a non-barbaric and modern-thinking Muslim person.
People who use generalizations often claim that even though they lump everyone together, they don't mean "all" of them, only the ones "who are". But that's merely justification; the intent of the generalization is pretty clear, which is to demonize whichever group they're targeting.
The only time a generalization is even remotely appropriate, in my opinion, is when positive things are being said as in "Hawaiians are very hospitable". Even then, some person might pipe up about their visit to Hawaii, in which they found the opposite. "All the Hawaiians I met were very hospitable"* is a better statement and more accurate, imo.
*I've never been to Hawaii and cannot speak to their hospitality or lack thereof.