Cancun is only 30 years old and crime is pretty much non existent. But, there are some areas of Cancun that now have some crime related instances. The hotel zone and the tourist areas are very well patrolled by the police. Cancun is one of the safest cities to visit anywhere in the world, but it never hurts anyone to be use common safe when traveling at home or abroad.
The best way to protect yourself against crime is in the prevention. Take these precautions no matter where you travel and you will enjoy your vacation to it's fullest extent. If you can, do not travel with valuables, if you do make arrangements with your hotel to keep all of these valuables including your original passport and other important documents sealed away in a safety deposit box. You can carry a photocopy of your Mexican tourist pass and any other ID's you may need. Try to use traveler's checks when ever possible. Do not carry around large sums of cash and when you use an ATM machine use one that is in a populated area such as a shopping mall. Avoid going to out of the way places that tourists do not frequent. When out on the town at night, traveling with others and leave your drink unattended. Do not wear expensive jewelry this only draws attention to yourself. When you go to the beaches, do not carry such things as money, watches, purses, or wallets. The beaches are public and many other tourists are also walking around the beach. Anyone could pick up your wallet or anything else while you are swimming. If you do ever have any problems while in Cancun; you can notify the police at 52 (998) 884-1913. The international consulates directory can be found here http://www.cancun.bz/cancunconsulates.htm. Other important websites for hotels http://www.cancun.bz/yellow.htm, for airlines http://www.cancun.bz/cancunairlines.htm, and for the local hospitals http://www.cancun.bz/cancunhospitals.htm may also help
Making sure you feel your best while traveling is always a consideration. The most common ailment when traveling is traveler's diarrhea. You should bring with you on your vacation anti-diarrhea medication. If you notice that you have had three or more loose stools in an 8 hour period you should immediately begin this mediation. If the symptoms worsen or you begin vomiting you should contact a local hospital for antibiotic medicine.
Immunizations are very important as we all know. There are certain immunizations that are recommended for people vacationing in Cancun. These immunizations are Hepatitis A for everyone over the age of two. You should receive this vaccine no less than two weeks before you leave. The typhoid vaccine is also recommended and should be taken prior to your vacation. All other immunizations should also be up to date.
All of these precautions are for traveling pretty much any place in the world. Cancun is no exception. Just use common sense and enjoy the wonderful Caribbean climate and sun.