I would use logistic regression when the outcome variable is binary, meaning it has two possible outcomes, such as yes/no or success/failure. It's particularly effective when the relationship between the independent variables and the log-odds of the outcome is linear. For instance, in a project predicting customer churn, logistic regression can help identify which factors significantly influence whether a customer stays or leaves.
Additionally, it’s computationally efficient and provides interpretable results, making it easier to understand the impact of each feature.