The correct answer is option B. "An important idea or refrain". The theme of a story is important to properly label a story and make it easy for the readers to reach it in bookshelves or online. An element that helps to identify the theme of a story is an important idea of the story itself, or a refrain that can give a general summary of what the story is about.
It essentially means that if you're gonna put yourself in a bad position you should at-least know that what you're doing. It's similar to "if you're gonna lie down with dogs, you're gonna get fleas"