I've been ninja'd a few times while writing this all out, but I'm just going to post it all anyway even though some of you above have already covered this.
Generally, picking whatever makes the most sense at the time is the right way to go. If you're hurting for energy and see a tech that will passively boost your energy production, go for it. However, there is some strategy. Sorry if you know some of this already, I see you haven't played in a while.
The Stellaris tech tree has many many branches. You have a deck of cards of technologies that are everything that you could research at the moment, and when you finish research the game draws (normally three) new cards for you to pick from. You may have a dozen available options, but only a few will be presented to you at a time. Here's a diagram for 2.2 that looks to be pretty accurate.
https://turanar.github.io/stellaris-tech-tree/vanilla/ . Note that this is the entire list; several of these are mutually exclusive based on your empire type and ethos (slavery techs won't be drawn if your civilization doesn't allow slavery, etc.), and several are locked behind events that you may not see in one or even several games.
Lower tier technologies have higher weights that mean they're more likely to show up in the shuffle for you. Once you've researched a number of technologies in a tier, the next tier of technologies will open up for you. Additionally, if your lead society scientist has an expertise in a field you're more likely to draw new technologies from that field.
With all of this in mind, there are a few strategies you can use to get ahead.
1. You will eventually exhaust the tech tree and get to the Repeatable technologies, the ones with the yellow arrow borders in their icons like Focusing Arrays and Flash Coolant near the top of that link up there. Some of these can only be repeated a limited number of times, others are infinite. Everything will come back around, so don't stress too much.
2. The purple technologies are Rare technologies, and are generally unlikely to be drawn in comparison to other techs in their tier. Additionally, they often need more research points to finish than other techs in their tier. If you have the chance to research one, think carefully on if it's worth it for you to snag it now or to put it off for a few decades when it will be drawn again and your research output is stronger. By the time you've cleared out normal technologies and are bumping into the repeatables in all of your fields of research, rare technologies are more likely to be drawn thanks to the way repeating technologies work.
A couple of examples: Subdermal Stimulation is a rare society tech on tier 2, so you'll have the opportunity to research it quite early. It allows you to change a species living standard to Chemical Bliss, where they're all extremely happy so they don't cause as much crime and such, but are useless for production because they're hopped up on drugs. This is generally used to pacify another empire's planets after you've conquered them while you wait for the malus of being conquered to wear off, but also has its own malice when you switch a species away from it as they go into withdrawal. If you're not planning on doing any conquering in the next few decades, you can probably pass on it.
On the other hand, Modular Engineering is a rare tech that decreases the cost of modules and buildings on starbases. This is obviously better the sooner you pick it up, and it's only a little more costly than other technologies in its tier. Maybe you should pick that up now.
3.
Any technologies that you decide not to research will not be available in the next hand of cards (unless you're drawing a very large hand and have otherwise exhausted the deck). There's a real opportunity cost to choosing not to research something, as it will be years before you get the chance again.
4. If you aren't drawing any technologies that you're interested in, use the opportunity to prune the deck so you can get to things that you want. Lower tier technologies generally have higher weights, so even if they're not something you have any interest in, getting them over with will stop them from clogging your options. I generally have very little interest in technologies that boost armies, but eventually Ground Defense Planning with its weight of 190 is stopping me from getting to Interstellar Campaigns with its weight of 70. This is even better when the tech is at the end of its particular branch, like all of the different blocker technologies in the society tree. It will take several years to clear all of those out, but once you do all of the other cool stuff will be drawing more often.
5. Be careful about opening up new branches of research. Researching Blue Lasers is nice, but it opens up a bunch of new options for you once you unlock tier 2 technologies. Putting that off so you can focus on infrastructure technologies like the Quantum Theory and Zero-G Laboratories trees may be a good move for you. This is mostly the case for weapon techs, they have the most branching.
6. If you don't want to actually savescum or are playing on ironman, you can manipulate the weights of your next draw by replacing the lead scientist at the last moment. Say you really want to get to Wormhole Stabilization, a rare tech. You're more than twice as likely to draw that option if your lead scientist has an expertise in Particles than one that only has an expertise in Computing. This obviously requires some foreknowledge, but you can use it even without actually referring to the tech tree; if you want food technology, a biology expertise will serve you better than one in military theory.
I hope this helped, good luck out there!