D lenses (and also G) provide distance information to the body. Enables the 3-D element of 3-D Matrix Metering on bodies which support it. Advantage is most noticeable when using TTL flash.
I've not owned either AF 28mm lens, but as I understand it, the 28mm lens was completely re-designed when the AF-D variant was released. Much better build and optical quality in the AF-D.
The 28/2.8D has one more element than the non-D and is a much better performer. It is also usually significantly more costly, for this reason. However, if you can afford it the D is worth the difference in price most times.
The D lens will work slightly better with flash (as Ian said) but the difference is subtle, most noticeable when shooting subjects that are very dark or very light (like brides and grooms).
you have to be careful because sometimes nikon updated their optical designs along with the upgrade to D lenses, but sometimes they didn't. you have to do a little research to get the scoop on each individual lens.