If a story is something that happens to somebody and its significance, which is how I define it, theme is a big part of the significance. It helps give a "so what" to the tale.
It's not unusual to hear writers say that they don't give much thought to theme until after they've finished a project. That was certainly the case with me in the early days. However, theme is particularly important in children's and YA writing because theme is part of what defines a children's/YA story versus an adult story. Simply having a child or teenage character does not automatically make a work one for children or teenagers. Even building a book around an experience a child/teenager could be expected to be part of doesn't automatically make it a children's/YA story.
For instance, a story about child/YA protagonists observing their parents' divorce with a theme relating to the impact of a family breaking up on children can end up being a children's/YA book. A story about child/YA protagonists observing their parents divorce with a theme relating to the impact of a family breaking up on an adult, married couple is almost certainly going to be an adult book. Two similar situations can end up being two very different books simply because of the theme.
How can theme help find a story? It probably shouldn't be the first element of fiction to be developed. If you have a situation and you've given some thought to characters and setting and from whom's point of view the story will be told, you can start thinking about the significance of the whole mess in order to generate some more material. The more material you have, the more likely your story will appear.
Try to avoid thinking of theme as one word. As a general rule, with one word you're thinking of a topic, not a theme. "Love," for instance, is a topic. "The destructive nature of love," "the healing nature of love," "love as a redeeming force" could all function as themes. "Love," all by itself, doesn't give a writer much to work with. It's a very static thought. "The destructive nature of love" is far more dynamic. The energy in a dynamically stated theme helps move the story forward all by itself. Will someone be destroyed by love or will someone destroy someone else because of love? Writers starting out with either of those themes know something immediately about what will happen in their stories.