As with all things writing these days there is a lot online at various writerly websites on the subject of theme.
This isn’t one of those posts.
The definition of theme is quite simple. It is an idea that recurs or pervades in a work of art or literature. Another way to say that, which comes from Websters, is that theme is a specific and distinctive quality, characteristic, or concern [in a piece of creative work].
I thi9nk of it as an idea or question that runs through a piece of written work. For example, when writing about a single survivor of the Holocaust is the theme survival, the Holocaust, struggle, or some similar idea? I think that writers who only take a glancing blow at the theme they are writing on would come up with a list like that. Instead, taking a deeper dive the writer would first ask what is it that would compel a person in a hopeless situation to endure. This writer would then go out and look for that answer and probably learn that it could be because the person has someone whom they love and that loves them that they believe they must live for. A classic example is a mother fighting all odds to live for her children.
But I don’t think that goes deep enough. It rings like cliche because you don’t have to go looking very far to find all sorts of stories where a mother survived for a child or a person survived some ordeal because they believed another person needed them to. Instead, dig a bit deeper. Look for an inobvious truth. Yes, the protagonist is driven to live for the love and needs of another, but they will still encounter hopelessness. What keeps them from laying down and dying?
Do some research and you might find someone who argues that love cannot exist in the presence of despair and that despair cannot live in the presence of love. There is an ever-present battle between love and despair—whether we know it or not—and so the theme can be centered on that battle.
Therefore, your story is an examination of the ebbing and flowing of love versus despair where one is always on the verge of winning out over the other. This theme will then color every scene, bit of dialogue, scenery (scenery is how the character/narrator sees it and is colored by their emotional state), and so on.
Now, if you were to hunt the internet for thematic ideas you will get lists such as this:
Good vs Evil
Coming of Age
Power and Corruption
Courage and Heroism
Individual vs Society
This is really just a list of words. And if you as a writer decide that your story will have a theme of, say, power and corruption, the Bible beat you to it as did everything written by the Greeks and Romans. You’re not being very original and because you aren’t being very original, you are making it harder for you to write a story that moves a reader’s emotions.
You have no connective tissue nor a guiding principle—a north star—to organize your writing around. It makes crafting good dialogue harder as well as good everything harder.
So, do the work. Dig deeper. And then dig deeper again. Find a meaningful and original theme.