Look at how clean the barrel is. This will tell you how well (in general) the previous owner(s) have taken care of the gun. Also look at the condition of the finish in particular the stock and bluing on the metal components. If it looks like it is decent shape, but is kind of dirty, don't be scared away from it. It likely has attracted a lot of dust to the oil while sitting on the shelf at the gun shop. If you can, ask to tear it down and ask for a cleaning rod.
I recently purchased a used Winchester 1300 from Gander Mountain. Bore and barrel looked good, but the gun was generally dirty. Asked if I could tear it down to look at it. A minute later I had it stripped down and then asked for a cleaning rod and a rag. It ended up cleaning up really nice.
A big part of it depends on how good of a deal it is. If it is cheap enough, I'm almost willing to overlook about any imperfection as long as it is still safe to shoot.
Another thing to consider when you see certain visual imperfections such as scratches and dings is if you think you can restore it yourself. The 1300 I purchased I ended up completely refinishing the stock. Pictures on the following thread.
It really is kind of hard to hurt a shotgun. Personally, I don't care how dirty the gun is. I check for mechanical problems and how smooth the action works. The older the smoother. Parts can be ordered from Brownells, so even guns with mechanical problems can be a great buy, as long as the buyer spots them and gets the price down.
Look at the barrel and see if there are any bulges. This can be from plugged barrel or shooting steel in too tight of a choke.
If the gun has choke tubes, make sure they come out easily. I have seen a couple guns that looked spotless but the choke tube was frozen by rust. This may need a soaking in Kroil or cut and re-tube.
The metal and stock finish will be reflected in the price. If its a super clean gun but only has 60% of the blueing, the price drops significantly. These are great bargains. You can spray paint them, Gunkote them, or have then reblued.
The most important thing with a shotgun is fit. If you plan to do any wing shooting, the gun needs to shoot where you look. Focus on a distant object, shut your eyes and mount the gun, when your eyes open, the barrel should be pointed at that object.
look over the barrel(s) real close. dents and dings can be an indication of how the gun has been treated. sure, safe queens can get dinged.
again, smooth operation. no stiffness or tight spots.
scratches and wearing marks are a sign of use, but may not be a deal killer if your planning upgrades/modifications.