If we accept fiction as the exploration of ideas, theme is the central idea explored in a story. It often involves the intersection of conflicting ideas.
Most themes emerge organically as a story is written and are developed further in editing and revision. Good drama gives rise to a theme naturally--conflicting forces engaged in a struggle. Those characters and struggles often boil down to simple ideas: peace, violence, opportunity, revenge, tyranny, desire, arrogance, etc. Going back, a writer might start to notice these themes and do things--small or large--to enhance them.
Some writers start with the theme and build a story around it, selecting characters and conflicts that will investigate the theme from every angle. To do that, one needs to develop characters and conflicts that highlight that theme in the best way possible. They have a huge gallery in the beginning, so they need to be adept at narrowing the choices and focusing their ideas.
The theme of The Superhero Murders might be law vs. vigilantism but I've found it's really an exploration of violence in a lawful society. To explore that theme, I've developed a lawful character and a vigilante character--easy enough, right? But that hardly explores the theme, so I have a character that aspires to vigilantism but never engages in it, a character that has given up on justice and humanity altogether, a character that walks a line between the two because of the situation I've put her in--that's Kim, the main character--and lastly I have the antagonist, a fellow that uses violence to achieve a twisted goal. He preaches law, but it's his own version of law. He strives for a goal that is insane to everyone else.
I began with a character, as many stories do. The theme and ideas came later. As I reworked and reworked (and reworked) the story, the theme grew stronger. Along the way, I continually thought the theme was vigilantism. Only recently did I realize that the large theme is violence within society. (e.g., do the police enforce the law through respect or through fear of violence?)
My thoughts: to explore theme, the writer needs at a minimum:
SIDE NOTE: Symbolisms and Motifs are related. In On Writing, Stephen King mentions that he eventually noticed that blood was a recurring symbol in Carrie. It appears in each major plot point. He then built that motif up during revision. (Now, a motif, a recurring symbol isn't the same as a theme--but it's a cousin, and this illustrates how such things as tone, symbolism, motif and theme can all emerge in revision.)
Writer of speculative fiction. Current work in progress is an untitled dark fantasy novella.