Greetings and thanks for the question regarding the comparative quality of lugers from WWI and WWII. Yes, there is a difference. But the question of why you want a luger will determine whether that difference matters. Do you want an inexpensive luger that functions so you can shoot it? If the answer is yes, then a non-matching luger in 9mm from either era (World War I or World War II) will do. Another option in this catagory would be one the relatively recently imported "Russian captures;" it would serve you well if you want an inexpensive shooter. If you just want a shooter, keep in mind that 9mm is far more available and less expensive than 7.65 x 21 (.30 luger). So even if the price on a 7.65 luger might be attractive, it may be attractive because the previous owner couldn't always find affordable ammunition!
If you want a "piece of history" then you're going to be competing with collectors and the price will go up. There are different "categories" of lugers and each has it's own place in history. The website of Simpson Ltd. has a pretty good arrangement based on manufacturer and year of production. Generally, some folks contend that the DWM lugers from the period 1908 to 1913 display a little better quality workmanship than those from the period 1914-1918. The same holds for the Erfurt lugers made before the war. In addition, all DWM lugers are considered by many to show a little better workmanship than the Erfurt lugers. There is even a little stamp that the war time luger inspectors used to mark frames that didn't meet the standards but were later deemed good enough to be used. This little mark is found more frequenly on lugers produced later during the war. The lugers made immediately after WWI, sometimes called "1920 commercials" are generally fine even though many were made with left over parts. These lugers don't generally command the prices of the war time lugers. Then there are the "double date" lugers, the Weimar army lugers and the "sneaks" before we move into the more expensive Mauser "banners" and eventually into the rearmament period models -- the "G" and the "K". Quality of these is great, but the limited numbers (and the increasing number of fakes) may limit the desirablity of these. Then come the 1936, 1937, 1938, and other war time lugers. Once again, generally the earlier the production, the better the workmanship. Krieghoff lugers of all periods are often considered to be among the best and the prices reflect that. In terms of price, the World War II lugers are generally more expensive than World War I lugers. Since World War II lugers have had a shorter life span, they are often in better condition than World War I lugers, but you can find a luger from WWI that's in great shape and WWII lugers that have been beaten to death (or frequently altered by Bubba). In terms of quality, some folks would suggest that the best workmanship went into the Swiss lugers, especially the ones prior to the 1929 model. Once again, the earlier the production, generally the better the workmanship with the 1900 being a little bit nicer finished than the 1906 and the 1906 being a little better than the 1920. Some folks would also argue that the absolute best fit and finish on any luger, including the Swiss models, is to be found on the ones made for Abercrombie & Fitch, which are relatively scarce and consequently a little pricey. And then there are all the "sub categories" such as artillery lugers, navy lugers, and other foreign lugers, but each has its collectors which makes them a little pricey too!
If you want a luger more for its history than its shooting quality, you can find lugers with a variety of pedigrees. For example, this is the 100th anniversary of the end of WWI, so maybe a 1918 DWM or 1918 Erfurt would be appropriate. Or maybe you had a relative that fought in WWII and want a luger from that period. Any of the WWII period lugers would fill the bill, but you could find one with the "capture paper" that gives it a context that you can identify and a person whose history you can research.
Hope this helps. Let us know what you decide to do and maybe share a picture or two of your new luger.