I'm working on a science fiction trilogy right now, and I'm having so much fun.
Writing science fiction is one of my favorite things. Not everything I write is science fiction; in fact neither A Guide to a Happier Life nor its upcoming companion novel, The Taste of Ashes, are science fiction. But when I have an idea that's practical for the genre and the time to do the research, I really love doing it.
Science fiction allows you to explore contemporary ideas while eliminating difficult variables through future technology. So, for instance, you could examine social inequality while eliminating economic inequality by setting your story in a world run by Star Trek economics. This ability to impose ceterus paribus assumptions on the world allows you to refine your message or your plot to a much narrower focus than you would ever see in the real world. That gives the author a lot of power in terms of narrative tone and voice.
At the same time, science fiction as a genre immediately broadens the scope of possibility for your story. You can take even everyday situations and make them seem brand new by allowing them to play out in otherworldly settings. You can embrace new challenges that your characters wouldn't face in a not-so distant future time frame. We can better explore the idea of humanity in a hostile landscape, since most landscapes on earth apart from Antarctica and the ocean floors have been explored and thus tamed.
Not only do you have a loose rein on setting, but science fiction can cover almost any tone. You can have a rollicking space adventure, a tense military sci-fi piece with lots of explosions, a bleak or hopeful glimpse into possible futures for humanity, or rich allegory for the state of current humanity. Hell, you can even do all of those in one book. Whatever kind of entertainment you hope to provide to your reader, you can do it through science fiction.
Science fiction gives you the justification to do otherwise frivolous science reading without having to be too serious about it. I lean toward "hard" science fiction, generally speaking, which involves actual science that exists now, sometimes extended and abstracted into future advances, but still grounded in the real world. The reason I enjoy this kind of science fiction is that there's at least a nod to the challenges imposed by technological limitations. The trick I've found to writing this kind of science fiction is to read your science and know it well enough to write it convincingly, but not so deeply that you write yourself into corners every few chapters.
Right now I'm working on a time travel novel, and most of the reading I've done into the science on the matter states that, while particles and even information seem to show some non-linear characteristics or behaviors, time travel as we think of it most likely isn't possible. Man, what a buzzkill. It was apparent early on that too much science would kill the story. Explaining exactly how the time travel works in the book probably involves contradicting existing science on the matter. Avoiding explaining exactly how the time travel works, however, leaves an open field, and the science I have read thus functions as building blocks for an engaging narrative.
And not only do I love all of these aspects of writing science fiction, I love all of these aspects of reading science fiction, too. Kim Stanley Robinson is one of my all time favorites in terms of masterfully including enough science to make the situation believable, but not so much that he contradicts himself. His works function as a space to explore the possibilities offered by ecological engineering, and possible alternatives to capitalism as it is currently practiced; his work is both bleak and incredibly hopeful, and these are qualities that I hope shine in my own science fiction work, honestly.
The more I write science fiction, the more I learn, not just in terms of science, but about myself and about humanity. And that is what I love most about it.