The vision of daffodils experienced by the speaker acts as a catalyst for his imagination. Before the image of that lovely host of golden flowers flashes upon his mind, he had been having trouble writing. (He was "wandering lonely as a cloud.") But once he thinks back to that wonderful scene from nature, his poetic imagination suddenly comes to life. The speaker has been woken, as if from a dream.
It's important to see this poem—arguably the most famous poem Wordsworth wrote—as a meditation on the creative process. For Romantics like Wordsworth, the natural world wasn't just a collection of pretty objects, something to be admired for its aesthetic beauty. It was a living, breathing force in its own right, part of a unified reality in which human beings were a very small and relatively insignificant part. As such, it inspired a whole generation of poets to see themselves in nature and write about the intimate connection they shared with the natural world.
The golden daffodils, like other features of the natural world, provide Wordsworth with a source of inspiration. Once these flowers flash upon his "inward eye," he can begin to write poetry again, and though remaining in the "bliss of solitude," he is no longer wandering lonely as a cloud. Thanks to nature, he's returned to the right path, the path that will lead him to create more enduring works of art.