Well to start with it's called a diopter. Now you get to sound all professional when you're out shooting with some clients. Just get set up and say, "Hold on, I first have to adjust my diopter." They'll never be more impressed. haha.
The viewfinder diopter is used to adjust the focus of your viewfinder and ONLY your viewfinder; It does not affect what your camera sees as in focus. The diopter can be adjusted so that those who don't have perfect 20/20 vision can see what's in focus without wearing their glasses.
How can I tell if I have to adjust the diopter? Don't use your scene as an indicator that you have to adjust the diopter. The diopter affects everything in your viewfinder including the symbols along the edge. What I would recommend doing is to put on your lens cap and look at the M, A, S, or P letter on your viewfinder. If the letters/symbols are blurry, adjust your diopter until it is sharp. Your viewfinder will be good to go.
Why not look through your viewfinder with your glasses on? You can, but not all viewfinder eyepiece cups are made the same. Wearing glasses will leave a small gap between the viewfinder and your eye. At night it may not seem like a big deal, but when the sun is hitting you in the eye and you can barely see your shot, you are going to want to use the eyepiece cup to block as much of the sun as possible.
Warning: Be careful when adjusting your diopter. It is very easy to poke yourself in the eye.