Summary
The Sentinels are the guardians of the Halo installations, and are controlled by the Monitor of the Installation.
They are hovering robots equipped with an energy weapon called a Sentinel Beam. These beams are used to control The Flood, however they can only manage them for short periods. In Halo 2, after a Sentinel is destroyed, these weapons can be picked up and wielded by a footsoldier.
When not engaged in combat, they contract into smaller forms, concealing their weaponry. In later levels of Halo 2, Sentinel Majors with personal energy shields and a more powerful blue beam make their debut, though all Sentinels are easily destroyed by plasma weapons.
The Sentinel Beam is also available in Halo 2's multiplayer. It can be found inside the bases on Backwash.
On the level The Arbiter, as you enter the main hangar with the Seraph fighter, you can see one sentinel firing a green beam, the same as the ones used by the constructor drones in the Sacred Icon level. This shows that at least some Sentinels serve repair functions
There is also a Needler Sentinel found on the level Quarantine Zone. It fires Needler rounds and drops a Needler gun when killed. However, this is a glitch and shouldn't be considered part of the Halo universe.