Phosphorus is needed for bones...but it has to be in a balance with other nutrients like calcium. Most of the insects we use as feeders have a poor ratio of calcium to phosphorus so we have to dust the insects with calcium before feeding them to the chameleons to help make up for this.
Also the ratio of phosphorous to calcium is important. Supplements for different reptiles have different ratios. A common mistake new keepers make is thinking they can use any reptile supplement. For chameleons you need to use a supplement with a 2:1 ratio of calcium to phosphorous.