Star Trek, I can't help you with...but Star Wars...
The best of the best stuff is the early 90s Tales of the Jedi comics that started the entire Knight of the Old Republic era. The comics are a hundred times more Star Wars than the two games, and I believe they actually started reprinting them not too long ago so they shouldn't be too hard to track down.
Another good one(well, two) is Crimson Empire and Crimson Empire II. Followed a former member of Palpatine's royal guard after Return of the Jedi. Very good stuff.
The Star Wars Inifinities are pretty good, too. With each taking a point from the movies and changing it(What if Luke didn't destroy the Death Star? What is Luke died on Hoth? What if the plan to rescue Han from Jabba failed?). They're very interesting changes to the movies and really run with things.
In the same time frame, the Shadows of the Empire comic is great, and if you can track down SotE: Evolution, I'd grab that one, too. A good continuation of a loose thread left in the story.
That's pretty much what I can think of right off the top of my head. Some others are out there, Rogue Squadron, Tales, etc, that are good, but don't stick out as much as the above do, for me. I would NOT recommend Dark Empire, Dark Empire II, or Empire's End. Its a fairly important story to the EU, but its just...bad. The art is a nice, unique style but the story pretty much kills everything that happened in the movies. It goes relatively ignored in the EU these days...passing mentions, but never anything too specific.