Can I sue a company going out of business?

You can sue them, but in general the fact that the company is “going out of business” makes it rather unlikely that you will get anything.

If it has any assets to liquidate, you might get something, at least if you get in line fast enough, or perhaps your state has a scheme that allows priority for claims of unpaid wages.

Whether you obtain the judgment in small-claim court or regular state court doesn’t matter a whole lot, but if it files bankruptcy, any state-court process will be stayed and you will need to proceed with filing claims in bankruptcy court.
If the company is an LLC, your remedy is probably limited by the company’s assets. In unusual situations, a corporate form may be disregarded as a sham and you can sue the erstwhile owners, but you’d need to consult a lawyer for an analysis of whether this can be done. There are several factors that are considered in a request to “pierce the corporate veil”— whether the business was (to begin with) adequately capitalized, whether the owners commingled their own funds and business funds, and so forth.

Even if the company files for bankruptcy and the stay comes into play, you can sue by bringing an adversary action in the bankruptcy court. You might not need to if your debt is acknowledged by the company. Either way, you would just stand in line with all the other unsecured creditors. You might end up with nothing or pennies on the dollar. With distressed assets like this, swift action is usually the best course of action. Consult with a lawyer or file your small claims case right away.

Source