It is used as a semiprecious stone when it is of desirable quality and color. Agate generally forms by the deposition of silica from groundwater in the cavities of igneous rocks. ... This banding gives many agates the interesting colors and patterns that make it a popular gemstone.