All of mankind's marvelous schievements begin as daydreams.
It's the latter ones that people need to worry about - not only the dreams of revenge as noted in the CE entry, but also dreams of the Walter Mitty type that function as a substitute for action or an escape from reality. In that case if unchecked, the fantasy eventually devours your life. But the useful ones are the kind that you mention - that spur one to take action in reality, whether that's inventing something new or writing a poem or novel. Which was of course where Lewis was going with that. His day job was in medieval & Renaissance literature - which involves sitting around and thinking (and writing) about people who sat around and thought and wrote.
Probably not fair to call them daydreams because it's too easy to confuse them with the harmful kind. "Creative thinking" or "inspiration" might be a better name.