Capacitors can be used for many purposes - for debounce of inputs, power isolation, curcuit loading. Some microcontrollers have D/A converters, oscillators, or transmitters built in and require external capacitors to operate these at specific frequencies.