Well, in your instance.
You would want to take the dot product between the normal of the surface and the light (the light vector should probably be inversed).
This will give you the angle between the surface point and the incoming light.
Now, what you should do is... map say, 0-15 degree's to the darkest shade, 15-30 degree's to a lighter shade, and 30+ to just regular shade.
Ok maybe those values need to be tweaked; I'm not toally sure.
Now, the big problem is that I don't see any of the other toon shaders in HLSL on the wiki. So what I would do if I were you, is go download ati rendermonkey. It has examples in it. in there is something called NPR metallic or some jazz, (NPR = non-photo realistic). Look at that. It will help; alot. The only way you can really learn is by diving in head first on this stuff until it makes sense.
PS. The shaderX2 books by Engle are excellent and there is an introductory book that covers many facets of directX shaders. I highly recommend it if you are serious about getting into shaders.