There are a multitude of reasons to borrow money, but I'll break them down into four categories:
By investment, I mean 'spending money now to increase your wealth in the future'. If you're a legal assistant making $40 an hour and you want to be a lawyer making $200, paying for law school is an investment. If you're paying $1000 rent & utilities now, and a comparable house would cost $900 a month for rent + utilities + maintenance + insurance + real estate taxes, then buying a house is an investment. If you need a car to get to work, buying a car can be an investment. If you run a restaurant, buying cooking equipment for it is an investment.
But it's important to recognize that these things are not necessarily investments, at least not in the economic sense. If the car you get won't let you earn more money than the costs of loan payments and car costs, it's not a good investment. If a fancy new appliance doesn't save/make you more money than it costs in your restaurant, it's not a good investment. I also want to distinguish investment from:
It's hard to define 'investment' briefly in a way that excludes 'speculation'. In general, investments are long-term, or you are adding value to whatever you've purchased, or you are gaining a monetary benefit through ownership. In general, with speculation you are not adding value to your purchase and you derive no monetary benefit from ownership. Speculation is often but not always short-term. Day-trading in stocks is speculation. Buying collector's items or art to sell later is speculation. Buying a piece of land to sell it later is speculation. I tend to regard anything with a high likelihood of no return but a high potential upside as speculation as well. For a business person, an MBA can reasonably be viewed as an investment, because most people with MBAs are able to get high wages working in that field. For an actor who wants to be a movie star, a degree in the performing arts is more akin to speculation: most people with degrees in that field do not end up working in it for high wages.
This means 'stuff I want but don't really need and which will not bring me greater wealth in the future'. A vacation, a luxury car, a 2500 sq ft house for you and your spouse, a work of art for you to hang on your wall, are all discretionary spending.
Much of what we think of as 'necessities' are not necessary to human survival: electricity, air conditioning, phone service, housing that conforms to American standards, etc. So I will define this as 'things needed to maintain your present level of wealth'. Living in a homeless shelter is not conducive to keeping a job, so a home that conforms to building codes can be considered a necessity. I would still discourage people from confusing 'luxury' with 'necessity'. Needing a place to live does not mean needing an upscale three-bedroom apartment.
On Spending and Borrowing
I want to emphasize that all four categories are perfectly valid ways of spending money. There are lots of reasons other than economic gain for purchasing something. Life is not a contest and money is not how we keep score. There is absolutely no reason that people shouldn't pursue a degrees in the fine arts if doing so will bring them happiness. I have an MA in English literature and I don't for a moment regret the expense or the time I spent getting it. (In my case, scholarships covered most of my college tuition, and my parents and I paid for the rest of tuition and expenses without borrowing).
That said, I would not recommend borrowing money for any purpose other than investment. Because only investment will allow the borrower to make money at the same time that the lender makes money. Only investment can create wealth. Borrowing money for other purposes means owing more money later when no extra money was gained from whatever the borrowed funds were spent on. It's losing proposition that generally leaves the borrower worse off economically.
Of course, sometimes circumstances force suboptimal behavior. It may well be better to borrow $1000 for necessities today and give up $1200 of luxuries to pay it back in a year. But borrowing money for necessities is inevitably a short-term fix.
And sometimes speculation is rewarded. A lot of people who sold houses in early 2007 were rewarded for speculating that housing prices would rise. People buying houses in early 2007, however, were the big losers on that bet. Speculation is at best a zero-sum game: for every person who buys low and sells high, there is another person who has sold low, another person who has bought high.
The Place of Debt
The point I most want to emphasize is this: debt has a valid place in the economy. It can let borrowers and lenders both enrich themselves, by giving borrowers the means to invest in goods and services that will increase the borrower's long term wealth. If you're going into debt for this purpose, that makes sense.
But if you are going into debt for some other purpose, I would encourage you to consider your other options instead.
I cannot recommend that you take on $50,000+ of debt to get a master's degree in English literature. It is not an economic investment. For that matter, I don't recommend that you go into debt getting an engineering degree if you hate engineering. You need to consider your own interests as well as what the labor market is looking for.
If you can rent a house for $1000 / mo, or buy it for $1500 / mo, buying that house is speculation, not investment. I'd recommend renting -- or if you want to speculate, or want to own for other reasons, then put enough money in as a downpayment that you can reduce your monthly cost of ownership to that of renting.
Banking institutions may well be willing to extend you credit for any of the above-mentioned purposes, and I do not favor legislating that away. I would like people to have the option of borrowing for a variety of reasons, even when I think many of them are foolish. I may be wrong. My position to judge your behavior and circumstances is generally not as good as your own.
That also means that we all must judge for ourselve the wisdom of our own choices. I cannot assume that a loan is a good idea for me just because I can get one, because even the best-intentioned lender doesn't know my circumstances as well as I do. So these are my guidelines on when I am willing to borrow money.