You would use debt: if you don’t have enough free cash on the balance sheet, have the debt capacity, and would prefer a cheaper source of financing than equity.
You may also use debt if you can get favorable terms (such as a low interest rate) on the credit agreement because the target has recurring revenue, low capital intensity, a leading market position in a defensible niche, steady cash flows, and a strong tangible asset base.