There is an art to choosing the right air compressor that means you should consider several factors before the device is actually bought. The very first factor that you should consider is what you plan on doing with the unit. Air compressors come in a variety of sizes with varying abilities to process and deliver compressed air. Choosing to buy one that has plenty of air compression capability for driving an automatic nail gun is fine, unless you plan on using the compressor in pressure washing the exteriors of buildings.
While it may not hurt to get a unit that has a little more horsepower than you need, settling for less power is likely to mean failure. Instead, go with a unit that has at least the horsepower you need today. While you are at it, consider one with a pressure regulator and interchangeable valve system that you can use for multiple purposes. This will help you meet your current needs and still give some leeway for more heavy duty projects that may come down the road later on.
Thinking about the source of power for your air compressor is also important. If you have electrical hookups handy, then an electric powered compressor is in order. These are actually the more common types and will most likely cost a little less than other models. If you do not anticipate having electrical power available, then go with a gas powered air compressor. The gas models are just as reliable as the electric ones, plus you can take them just about anywhere. It's not a good idea to use a gas powered compressor in an enclosed area, however.
Storage tanks are also an important aspect of the air compressor. Depending on the area where you live, you may want to make sure any unit you purchase has a sealed solenoid that will not be broken down by prolonged exposure to humidity. Like many appliances, compressors are not immune to weather conditions, so take into consideration the local climate, and you will see a longer life from your device.