Colorful insects are this way normally as warning to birds or other animals that might consider eating them or messing with them.
Lots of tree frogs are quite colorful and many have poisonous glands. I have heard that some people will catch them and lick them, the poison is a hallucinogenic for humans.
When I was a teenager I mowed yards to raise money in the summer. One yard I mowed had a tree which attracted catepillars which would leave a welt that was quite painful if you brushed up against it. When they arrived we would give the tree a wide berth. They blended into the foilage and were nasty buggers.