Game codes are found in a number of ways in the Doom 3 enviromnent. The most common location for a code is on a character's PDA that you pick up along the way. It will be either in an Email or on an Audio Log in that case.
There are a couple of other ways of finding codes. In one case a code is written on the side of a desk or filing cabinet or even displayed on a laptop.
The main use of a discovered code is to open a locked Storage Locker. The locker may be in the room or nearby in the level. However, in some cases the locker is in a later level - .e.g. Nick Sadowayj's Storage Locker 003.
Other uses for a discovered code is to unlock certain doors, unlock an airlock, or in one instance you need a code to restart a valve from an operations terminal. Again, the code you find may not be used for several levels, for instance you find the code for the BFG locked in M. Abrams Office several levels before finding his office.