A generalization can be unacceptable on at least four different grounds. A false generalization is unacceptable because membership in the reference class does not increase the probability of the hypothesis. A non-robust generalization is unacceptable because it uses a reference class that is too heterogeneous.
Are generalizations good or bad?
generalizing and stereotyping are neither good nor bad. rather, its the way we the individual use them and/or the intent we have for using them.
Why do we need to avoid generalization?
By keeping your writing free from hasty generalizations, you increase the chances that your work will hold up against the scrutiny of fact-checking and will, therefore, better represent the point you are trying to make.