A site map is like the table of contents for your site... It provides search engines with a direct path to each page of your site, which favors quick indexing for all the pages.
robots.txt is typically used to tell search engines to exclude from the index a specific page or folder of your site.