Compressed air is better for blowing dust off computer parts (preferably outdoors). Vacuum cleaners can produce static electricity, though I've seen people recommend them. If you made sure you are grounded (as usual before doing anything inside a computer) and don't get too close to electrical parts there shouldn't be too much risk (I've used a vacuum to take out dust bunnies in the bottom of the case and get around wires, etc). Clean off fans with a cloth or brush, though; holding a vacuum over one for very long can rev them up quite fast, possibly doing damage (or at least extra wear and tear on the bearings).