Usually for a business it's up to the oyster shucker to worry about the quality and you're to just enjoy.
You can tell if the oyster is bad if it has an off smell. Much like fish, fresh oysters won't give that off rotten fishy smell and tend to smell mild.
Many people suck them whole but you should chew oysters before swallowing to taste if there's anything wrong. If there something not tasting properly don't chance it, spit it out!
If you are buying oysters to shuck yourself try to get some without noticeable openings or cracks in the shell because this could mean that the animal is dead and possibly rotten. Wash the outer shell of any debris clinging on and inspect the shell thoroughly before shucking.
The oyster just shucked should be attached to the shell still before the oyster knife cuts it off for eating. If it's detached from the shell without cutting it, the odds of it being bad go up.
The meat should look shiny and mildly semitransparent the oyster juice should smell of the water it grew in and should be clear. Bad meat will look dried and unhealthy and the juice will be cloudy.
PS. When you shuck the oyster don't wash the meat off after shucking it; you'll lose the oyster juice and that gives it tremendous flavour!