When a retailer goes out of business it usually follows a predictable arc that sharp customers can spot. You often see signs like dwindling inventory, certain sizes being sold out, and fewer employees working in the store.
With a public company, it can be even easier because those companies must share their financials. It's usually a gradual process, but repeated quarters with losses and dwindling cash reserves start to paint a picture of a company in trouble.