do a search, you should get a pretty good amount of info but your best bet is to go read up at
www.dieselplace.com because its a whole forum dedicated to GM diesel trucks, and with over 60000 memebers theres a ton of good stuff to research, and heres a couple of my replies to similar questions, im just going to copy and paste them cause im too lazy to write up a big thing now, hope it helps:
as far as what year its pretty much your call, the 01-03's (LB7) did have injector issues but they are warrentied up to 200k miles by GM, mine are still original at 108k and no problems yet. some of the LLY's (04-05) did have some overheating issues but im pretty sure thats all been fixed by now. the LBZ's (05-07) i dont know a ton about but im pretty sure they were the first years with the variable turbo which gave it more power. the newest generation is the LMM which i believe is just about the same as the LBZ but with a little more power and the new emmissions standards including the DPF in the exhaust. and as far as reliability goes they are holding up very well, theres plenty of dmax's with 300K+ out there, ive personally seen a couple and even seen one with over 500k on the clock...
look for injector issues from 01-03, get the vin and have it checked to see if they have been replaced. they are warrentied up to 200k so if they havent been done yet its not a huge deal, mine are original as far as i can tell on my 03, 107K miles and it runs like brand new. you can check for white smoke out of the tailpipe, less than normal power is also an indicator and fuel in the oil is a definite sign of bad injectors. other than that i dont think there are really a whole lot of other things to look for except the normal used truck stuff. if you can it would be good to find out how the truck was used and if it was run stock or with a programmer cause depending on what programmer was used could mean possible tranny issues.

03 GMC 2500 HD crew duramax, 6" full traction lift. 37/13.5/20 Toyo Open Country MT's,
ATS E-Power tuner, AEM intake, Stage 3 allison
452 RWHP/755 TQ verified on superflo dyno, 7/19/08 (ATS level 10) and thanks to Chuggs for the sig!