Yes. Creditors like to see evidence in your credit report that you have a history of paying off credit on time. If you have a credit card, use it every month. Make small purchases and pay them off to avoid interest charges. If you don't have a credit card, apply for one. If your application is rejected, try to find a cosigner or apply for a secured card -- one issued after you deposit some money into a savings account, against which you can charge purchases.
But a word of caution: Before you apply for credit, get back on your feet financially. Otherwise, you're likely to end up with high-cost credit that will put you back in the hole again. To learn how to make and stick to a budget, see Nolo's article Budgeting: How to Make a Budget.