It may or may not come with the rain. It is rare, but the conditions have to be right for it. Just like that with our best ideas. We need to cloud our minds with many ideas, good and bad. As the ideas bounce around, with the friction, the chances of lightning increases.
That means practice, practice, and more practice at your craft.