As a general rule, no. They are often scams. If you need to take a loan on such short notice, you'll probably need another loan to pay back the initial loan after your paycheck minus the loan falls short of your needs, and another one to pay off that loan... Rinse and repeat until you either go bankrupt or pay the loan company thousands to finally get out of debt. Often it's better to try and save money or even sell things.
That said, you should also be careful of applying general rules universally. If you can't cough up the money for your basic needs due to an unexpected expense, you can't sell your stuff quickly enough to pay on time, and you have a viable way of paying the loan back, a payday loan can be the least bad option.