The moisture in the shower softens hair slightly, making it easier to shave. But there's a right way and a wrong way to shave in the shower. For one thing, you want to get the shaving done early in the shower. After about 10 minutes, the heat and moisture of the shower make your skin swell. If you shave it then, you won't get a very close shave. Later, when the skin dries out and returns to its unswollen state, there will be stubble.
It's also very important to store your razor in such a way that it gets completely dry in between showers. If it is allowed to stay moist, it makes a wonderful home for bacteria, and we've already explained why you want to keep bacteria away from your underarms.
Another important factor is the freshness of your razor. Experts say you should change blades every two weeks, or every five shaves or so. A dull razor forces you to press down harder or make more passes with the razor, which increases skin irritation. Multi-blade razors are better than single-blade razors for this same reason -- you'll accomplish a smooth shave with fewer passes, so there's less wear and tear on the delicate skin under your arms.