All things being equal (clock speed, price, etc) then I would go with a Pentium D over a Pentium 4, even though the second core doesn't always provide a huge (or in many cases a noticeable) boost in performance. But the D does have more performance potential than an equivalently clocked Pentium 4. So again, all else being equal...
Now that I think about it, the first part of your post doesn't make a lot of sense. The Pentium D line of CPUs have the 800 and 900 model numbers, whereas the Pentium 4 line has 500 and 600 model numbers. So there wouldn't be a Pentium 4 820, just a Pentium D 820.