It all depends on the circumstances. Taking out a loan can also be a good way to invest in a business opportunity or an investment that would offer long term benefits. There are several risks to consider when taking out a loan from the bank. If you are unable to make your timely payments, you would then default on your loan and that would obviously come with some additional problems.
A loan is only useful when taken out for a good cause. In this case, a good cause is something that would bring in huge profits later on.
Taking out a loan to go into investments is not advisable. Individuals should only go into Investments with spare money and not money borrowed from the bank. If, due to some stroke of ill luck, you lose out completely on your investments, you would have lost all your money and even worse be in debt to the bank. The bank can be merciless when coming for their money.
Its also wise to consider how deep your pockets are before investing so you wouldnt have to rely on the bank for a loan or a bailout
It depend on what kind of investment one is taking loan for, like if it is taking loan to invest in cryptocurrency it is never advisable to take a loan because volatility and how unpredictable the market is. But if it is a loan to invest in a physical business that has no high risk and well profitable one can go ahead to take a loan that he or she can afford to pay back. It just depend on the nature of investment that will determine if it is okay to take loan or not.