When you are working at home, the dress code is up to you. But don't just assume that working at home means working in your bathrobe.
Think about the way you do your best work. Can you focus on work, no matter what you're wearing? Or do sweatpants and a T-shirt make you feel like you should be at the beach? Are you more focused on your work when you're at your most comfortable with your lucky baseball cap on? Do you mentally feel "not at work" when you're not in attire that's totally presentable to the outside world?
When you are deciding how to dress in your home office, don't lose sight of the fact that a large part of your decision to work at home is largely based on the desire to make your own rules in your own workplace. Don't feel tied to the constraints of traditional work attire if you feel that you can be productive without it. The only person you have to impress is yourself!
However you choose to dress, we suggest you keep one thing in mind. If you are meeting clients, customers, or suppliers, or have a meeting with your professional peers, dress according to the custom within your profession. When you're working at home there's no one to impress. However, you don't want anyone else you deal with on a professional level to discount you or your business because it's a home business and they don't take you seriously because of the way you dress.
This doesn't mean you should wear a suit when meeting with others if that's
not the traditional dress for those in your field. In some fields, a person
wearing khakis is dressed-up. In other lines of work, nothing but a business
suit will suffice. Err on the professional rather than the casual side of
dressing if you're not sure!