There are many Sholkas in several Hindu scriptures which sings the benefits of putting on a gemstone. It is believed that the power of a planet lies buried in the gemstones which represent that planet.Going by that analogy a weak planet in a horoscope can be strengthened by putting on its gemstone. But there is something more to understand which practically even the astrologers oversee.
People put gemstones as per the running Dasha.
Many People put gems on those planets which are weak in their horoscope.
People imitate other people for putting on gems.
Every planet is not a supportive planet in a horoscope, the gems when put necessarily strengthen the planet they represent, so it may be a case that by putting on a gemstone of an enemy planet we increase or enhance the potential of the hostility of that planets towards us.
This implies we should observe restraint while putting on gemstone and in a state of confusion it is better to avoid the gem altogether.