For the record, there's actually a third possibility, Magnetorquers. Here's why you would use one vs the other.
Magnetorquers - Inexpensive, low maintenance, but don't work in all situations. Used by LEO spacecraft typically, and small in size. They work by pushing off of a magnetic field.
Reaction Wheels (Or Gyros) - The trick here is that you can't take out a momentum change using only reaction wheels. You either need to stop the spacecraft from moving, or else offload the momentum with another form of propulsion. These work great if you can reasonable expect to have the spacecraft with the same angular momentum eventually. They tend to break down over time, but can last for many years. The reason they can't is because basically they exchange momentum from the spacecraft with momentum in the wheel. You can only make a permanent change if you are pushing against something external, or pushing something towards or away from you, Reaction Wheels just change the momentum until the wheel stops spinning. They can change the orientation, just not the momentum. See this video for a good demonstration.
Thrusters - These work all the time, but use fuel. Thus, you are limited to how much you can use them based on the fuel load vs. the lifetime of the mission. Also their exhaust can be dangerous to your satellite, if it carries something sensitive - that is the case of the Hubble Space Telescope, where thrusters could contaminate the optics.
Bottom line is, you use what you can, and will cause the minimal impact to your spacecraft.