In any narrative, a theme is a broad idea that the writer wants to examine through his/her story (or book or play). For instance, in Shakespeare's Romeo & Juliet one of the themes that he explores is the futility of love, or how love does not lead to happiness. Another theme is the importance of family. A narrative, of course, may have several themes, but a paper only has one thesis. The thesis is a claim, the writer's opinion, about a certain aspect of the text. It can be about a theme or one of the other elements of narrative such as character or setting. To use R&J as an example, a thesis on the theme of love coud be stated as: Shakespeare looks at the idea of the futility of love and its consequences in his tragedy Romeo & Juliet. Then the writer would go on to defend his/her thesis through use of the play itself and outside critical sources that support that thesis. So: theme is an element of the text; thesis is a claim about the text.
In undergraduate study, a thesis is the defining idea of an essay. We usually think of it as the sentence that states the dominant idea of an essay. In an argument essay, for instance, the thesis directly states the argument the writer makes. It is up to the writer to support the thesis/argument with evidence, etc.
Theme, in contrast, is associated with fiction or poetry rather than nonfiction. Theme is the unifying subject or idea of a work. It is a subject or idea that is repeatedly revealed in a work, thereby unifying the work. In Shakespeare's Macbeth, for example, ambition serves as a theme, as does the difference between appearance and reality. These themes recur throughout the play adding unity to the work.