Yes, you can workout at home and gain muscle. However, this is subject to what you have at your disposal at home. You need a serious home gym and not just a Bow-Flex contraption. For your home gym setup, you will need a bench, a rack, and weight plates that are up to 600lbs.
You can progress by adding to this basic requirement with time.
One of the most important things required to build muscles is referred to as progressive overload. This implies the stimulus needed for the muscle to keep increasing every time you work out.