Here is some background information on the song from The Sunshine Superman Songfacts: Donovan was good friends with The Beatles and they were both making very innovative and trippy music at the time. Donovan's producer Mickie Most told him not to play this to Paul McCartney under any circumstances, because he knew McCartney would be tempted to do something similar.
Originally, this was subtitled "For John And…
Sunshine came softly a through my, a window today
Could've tripped out easy a but I've a changed my ways
It'll take time, I know it but in a while
You're gonna be mine, I know it, we'll do it in style