Technically, yes, you can install Battlefield 2142 onto a portable USB hard drive instead of your computer's internal storage. During installation you simply point the installer at the USB drive as the destination folder.
There is a catch, though. This only works reliably as long as the drive keeps the same letter assigned to it, and it will not travel well to other computers. The reason is that installing the game writes entries into your system registry that the game depends on to run, and those entries stay behind on the original machine.
Not every game behaves this way. Older titles like Diablo, and even some modern ones such as EVE Online, tend to run fine from a USB stick on almost any computer.
One more thing to keep in mind: transfer speeds from a USB drive are slower than an internal disk and can be demanding on your CPU, so a data-heavy shooter like BF2142 may not be the smoothest candidate for this kind of setup.