It's truly hard to compare the two, since each achieved their popularity in different mediums.
Star Trek was a creation for television. The various TV incarnations, from the 60's onward, were generally well written and produced. The acting was usually very good. Some episodes were absolutely brilliant, like "City on the Edge of Forever" and "The Trouble With Tribbles" (original series,) "The Best of Both Worlds" (STTNG,) "In the Pale Moonlight" (DS9,) and "Year of Hell" (Voyager,) to name a few.
When Star Trek was adapted to the movies, the overall quality went down, compared to the TV episodes, although "The Wrath of Kahn" and "The Voyage Home" were quite good. The others seemed derivative, playing on the popularity of the Star Trek franchise.
Star Wars, on the other hand, was created for movies. The first movie, "Star Wars," may be one of the greatest movies ever. The next two were good, but didn't match the sheer quality of the first one. The last three were nothing more than exploitations of the Star Wars theme.
TV adaptations of Star Wars are, generally, run-of-the-mill.
One controversy involving Star Wars, was when Lucas remade them to take advantage of state of the art CG. Some folks think it made the movies better. However, to those who can appreciate the special effects of other eras, the originals have a certain charm that makes them classics.
As to which is better, Star Trek or Star Wars, comparisons can be difficult. Since each was designed for different mediums, each one has different qualities. As mentioned previously, The first Star Was was one of the best movies ever. However, when we look at the sheer quantity of Star Trek franchise episodes, and the high quality of many of the episodes; in terms of script, production, and acting, one may conclude that the Star Trek franchise is better than the Star Wars franchise.