The input capacitor removes any noise on long (over 6") supply leads, the output one may improve stability, its optional. See http://eu.st.com/stonline/books/pdf/docs/2154.pdf