Reputation is for contributing content that others find useful. Mostly this comes from good questions and answers; it can also come from edits that get approved, and on rare occasions somebody values an answer so much that he awards an extra bounty.
Badges are lightweight. Some recognize achievements for which you've already earned reputation -- Mortarboard for hitting the daily reputation cap, Nice/Good/Great Answer/Question for achieving certain scores, and a few others. Most badges, though, are just "attaboys" for doing things that help the site in other ways -- voting, flagging, reviewing posts, participating on meta, and so on. While we are a Q&A site, we are not just a Q&A site that operates on its own; we need the community to participate in other ways too, and badges recognize that.
While people only see which badges you've earned by going to your profile (much as they only see how you earned reputation by going there), how many
badges of each type appears under your name and rep on all your posts. So badges are not invisible.