When you exercise, heat and sweat can cause metals to corrode or rust. It is therefore recommended that you remove all metal jewelry before going to the gym. This includes necklaces, earrings, bracelets, rings - basically anything with a metal component.
Plus, the gym is a place where you need to focus on your workout, not distracted by earrings falling off or necklaces getting tangled up with the treadmill belt. Furthermore, most gyms have rules against wearing jewelry to keep everyone safe and to prevent injuries from occurring. Jewelry can snag on equipment or other people, which can lead to accidents.
When you are in the gym, your hands and fingers are often in contact with free weights or machines. If the machine is wet from sweat, it can corrode your rings. In addition, if you get your ring stuck on a weight machine or work out equipment, it can cause a serious dent in your ring.
Another point to consider is that wearing metal jewelry is hazardous in certain exercise classes. For example, if you are taking an aerobics or dance class where there will be high impact movement involved, you should definitely remove your jewelry before participating. This is because high impact activities can cause jewelry to fly off of your body and onto the floor - where it can become damaged, lost or even contaminated with germs. You may even hit another person with your jewelry.
High impact activities are not the only time jewelry should be removed. For example, if you will be participating in any activity that requires you to submerge yourself into a pool or body of water, it is best to remove all metal before entering. This includes rings, watches, bracelets - anything made of metal! You don't want to lose a prized piece of jewelry to a pool drain.
However, wearing simple stud earrings is suitable for most activities at the gym because there is minimal contact between people. Wearing stud earrings or other small pieces of jewelry with no sharp edges is the best way to prevent injuries. If you are not doing any intense activity, then wearing earrings is just fine.
In general, it is best to err on the side of caution and remove all metal from your body before going into the gym. However, if you feel that wearing jewelry is not distracting or dangerous then by all means keep it on! Just remember that different people have different opinions, so be sure to respect the gym rules if they state that jewelry is not allowed.