It can seem silly to wash an orange or an onion when you are going to be peeling it anyway, but it is important to wash even those fruits and vegetables that you will be peeling or cutting that you only eat the inside (such as watermelon or cantaloupe).
When you are cutting or peeling anything, you can transfer any harmful bacteria or pesticides from the skin through to the part you will be eating. Your knife can easily transfer this as you cut. So you should always thoroughly wash all fruits and vegetables before you eat or cook with them. You should also wash your knife between cutting each fruit or vegetables as well, too.
You should wash all fruits and vegetables in warm water and using a vegetable wash. You can buy a commercial vegetable wash, or make your own vegetable wash.