you need to EAT to build muscle. weight gain and weight loss is more about food intake than anything. You can't build something from nothing.
and with only bodyweight, you'll reach a point where you've adapted too much because you can't add more stress/weight. you CAN be fit and look good nekkid on bodyweight exercises though.