It depends. In terms of world-building, I would definitely give that to Lord of the Rings. In terms of characters and themes, though, I'd go with Star Wars. Lord of the Rings has lots of majestic set pieces and a very well-developed, beautifully composed world, but its characters fall a bit flat for me. They're not very dynamic and it's here that I'm left feeling a bit cold. Star Wars, though, is (in my opinion) thematically richer with better drawn characters. This might be because I've alway gotten the sense (at least, this has been my impression) that the Lord of the Rings feels a bit like a historical epic while Star Wars is more of a modern myth. I think it's easier to inject themes in a mythic tale than one that has more of an aura of history.