Assuming you mean gemstones on top of the actual eye, like a protective layer:
Normally, pearls grow like stalactites/stalagmites, in layers of crystal, rather than a single crystal. At the boundaries of each layer, the fit is not perfect, so light is reflected and refracted at those points. The result: a translucent structure through which the organism can make out light and shadow, but not SEE, as such.
In order to get a working eye, the organism would need to have a layer of plasma in contact with the back of the gem, saturated with the mineral the gem is composed of. The back of the plasma layer would be a transparent organic sheath or cornea, allowing light to enter the eye proper. Ideally, the plasma would prevent crystal boundaries forming and the gem would grow uniformly, gradually getting pushed out as it grows. In practice, this is unlikely, so you'll end up with flaws in the gem, that inhibit sight.
The other issue is that gems, like other inorganics, dissolve only in ionic solvents, not covalent ones. I.e., the gem may be water soluble, but definitely not soluble in any organic solvent. If it is water soluble, then it will dissolve in rain, sweat, high humidity or any other environmental water. While this may not melt the whole gem, it will cause it to run, which will bend the surface in unpredictable ways, distorting the light entering the eye. If it is highly insolvent in water, (everything dissolves in water, to some extent) then it will take forever to build up a large enough concentration for the gem to grow to a visible size: the minerals will have to be absorbed by the body, once consumed; then transferred in dissolved form to the circulatory system (let's say bloodstream); since it won't dissolve in water or any organic compound, neither of these processes occur at any significant rate. It will therefore take years of a very fast circulation to get sufficient mass into solution. On the plus side, deposition will be quick; on the minus side deposition can occur anywhere, not just the eyes.
A possible alternate, would be a binary system: compound X is absorbed by the bloodstream, compound Y secreted by the cornea. When X comes in contact with Y, it precipitates compound Z and the rest remains in solution, to be excreted through the bloodstream. This process is the same as layering described above, with the additional problem of multiple crystals forming, making the gem useless as a lens.
TL:DR, probably not going to work well