That’s a big discussion. There are two (or three to be precise) theories for the capital structure of the company. The general rule is that debt is cheaper and companies should therefore seek to raise debt to finance their projects. However, debt is more risky and it will therefore start becoming more expensive when a company will have raised a lot of debt.
The optimal point is hard to determine but the rule of thumb is all companies should have comparable to the industry capital structure and enough debt to enjoy cheaper capital and the tax shield.