The use of an underlayment protects shingles and decking from wood resins and water penetration and increases fire resistance.  Many manufacturer warranties also require the use of an underlayment.