I'd start by doing two things.
1) Clean the rim of the body of the light where it makes contact with the tailcap. That's where the circuit completes to get power to the emitter; if it's dirty or has any oxidation or the like on it, it can interfere with the current flow and reduce the output of the light. Try cleaning the threads on both the body and the tailcap, and the end of the body (preferably with something like De-Oxit, but rubbing alcohol will do in a pinch, and use some nyogel to lube the threads afterward.
2) Make sure you're using new and fully charged cells if you're running nimh's; if your cells are old, they could be degraded and not able to hold as much charge or supply as much current as a new cell. If you're trying to use alkalines, don't. They just don't handle the demands of high performance LED lights very well. If you want to use primaries, use energizer ultimate lithiums instead. They're more expensive, but worth it, because they have about 3x as much power in them as alkalines, and don't sag under higher loads like alkalines do.
PS: if your light doesn't have an XPG in it, it's not an SC51, but an SC50.