Step 1: Decide how scientific you want to be
There are three general levels of science fiction. 'Soft', 'medium', and 'hard'.
Soft science fiction is science fictiong that doesn't even want to try and justifies everything with either new materials that aren't explained or new fields of science that aren't explained. A great example of something which is purely soft sci-fi is Star Wars - there's no part of it which makes sense, and lot of what is done (like the 'etheric rudder' that fighters use to maneuver against the vacuum of space) gets handwaved or a brief explanation at best. This is the type of science fictions that invokes Clarke's Third Law ('Sufficiently advanced technology is indistinguishable from magic') the most. (cough The Force cough)
'Medium' is when the author uses justifications and real science, but will occasionally violate something in takes a degree to notice. Take Asimov's robots, for instance. They have positronic brains - positrons being antimatter. How? Well, when Asimov first started writing them, he just said that they would figure out effective magnetic methods to keep them contained and effective ways of generating them. That's fine, but we've got no way to do that now - so it's medium. Something which sounds plausible, but can't be done with current tech. Alternatively, consider Asimov's odd element thiotimoline - it's a fictional compound, but Asimov's written entire papers on it's use and properties, so the readers with sufficient knowledge can easily figure out the rules without the writer constantly pulling things out from thing air.
'Hard' science fiction violates no known rules of science. This is something like 'The Martian'. In a hard science fiction story, everything is considered and applied by the author. The 'science fiction' in the title is just two separate components, really - it's a story about real science, but the science happens to be fiction.
Now, it should be noted that these, in general, are guidelines. More than that, no story really focuses itself on any one aspect. A story which has a mostly hard approach which encounters a brief jolt of medium sci-fi makes for a great story setting. Rather, these are approaches to solving a problem. When you encounter something that you need to do i.e. 'Humanity-killing virus', 'Space travel', 'beam weapons', 'giant robots'. Decide what works best for your story - if you're writing a mostly soft sci-fi, using a hard sci-fi approach to a problem is very problematic - it'll leave your readers wondering why the rules were only applied there. Same with the reverse. Middle sci-fi can be applied to both, but take note of the tones involved as well - it can be just as jarring if not worth if implemented incorrectly.
Step 2: Decide whether you'll sacrifice story elements to the mechanic
Science is reality, not fiction. When you're writing a story, it's important to note that sometimes what you want and what's possible can't coincide. At that point, you're going to be forced to make a choice - do I keep story element X in, or do I obey science law Y? And remember, you're story is fiction. It's not reality, no one expects in to be. Shaving a little off the rules is fine. But violating them does cross a line - not necessarily a bad line! Star Trek wouldn't be exciting without the ability to warp, would it? But it does cross a line, so you need to say to yourself, whenever you have a problem 'Can I still have a good story without it, or is it so important that I'd be willing to handwave things for it?' Because, by deciding that, it helps your mindset in solving the problem.
This is after you set the baseline for the level of sci-fi, because it's important to first establish the rules you'll be using, then break them. This is allowed - rules exist to be broken in literature. And even in sci-fi, it's allowed. There's very good sci-fi that introduces a plot point which ducks the genre. Sticking to the rules will just create something that everyone expects, so you're allowed to subvert them occasionally, it's not something good writers can do, it's something good writers must do. But on the flip side, if all you do is violate the rules, then you wind up with a hot mess that doesn't make sense.
Step 3: See how other people solve the problem
This is also to set a baseline. We know how hard FTL is, and we know all the problems with wormholes, and hyperspace, and colony ships, etc. etc. But it's a convention with science fiction these days - so it's OK. Same thing with time travel. Since the early days of sci-fi (literally, HG Wells) time travel plots have existed. And people are fine with it, so long as the rules are set up. (Or not! Dr. Who rules for time travel are all over the place, but the Dr. Who universe runs on soft sci-fi, so it's OK.) Seeing how other people solve the problem will give you a good idea of how to do it yourself.
Step 4: Research. Research. Research. Then solve it.
Now that you have your approach, you've decided what rules you're going to allow yourself to break, and you know how other people might do it, it's time. Run the numbers. Read the books. Look up the articles. Talk to an expert. Figure out what you can and can't do with the problem, and then once you've done that, solve it. It shouldn't be too hard, after all that. You'll know all the components, and simply fit them together. Part of the research process can also be asking other people how they would do it - that's why this site exists. (And also why we've got tags, like 'magic', 'science-fiction', 'hard science', 'reality-check', etc.)
Step 5: Present it to someone who isn't versed in the stuff
(Skip this step if you're writing hard sci-fi.)
Most important part. Remember, you're telling a story here, not writing a paper. Take a friend / relative / acquaintance / internet writing group (I use the latter). Then write up the story with your solution - it doesn't need to be the whole story, just demonstrate how you solved it and give it to them. (Or just explain it verbally.) Take note of their reaction - were you too technical in your approach? That can happen - you know how to do something so you go overboard in explaining. In that case, just dial it down. It might sound weird, but occasionally I write something, do a few hours research to check if it's plausible, and then just keep it in. Sometimes it's enough to know that the problem simply can be solved and doesn't need you to go into specifics.
Other times, you might get a reverse problem - you check something, figure it out, and then have your characters solve a problem. The reader says 'Hold on. That's not how X works." And that's when you realize something - you explained it from the perspective of someone who's spent a week researching things, and you skipped a few steps, starting from 'We insert DNA into frogs' and end with 'And then all the world's lilypads turn to gold'. Sure, it makes sense to you. But does it make sense to everyone?
And then sometimes they'll say 'Well, why didn't you solve it like this?' And then you realize that you know you can't because of principle Y, but they don't know principle Y. And not only that, your different solution won't work anyway because of little known principle Z, but you decided that it wasn't worth rewriting a quarter of the plot because of it. Then you simply say 'That's right. It should be solved like that'. Because, after all, part of solving a problem in a sci-fi story is the story element.