From Halopedia, the Halo wiki
One way to get unlimited ammo is to give an ally a weapon. Even if there is only one round or 1 unit of energy remaining when you give it to them, the weapon will never deplete unless you use it again, but you will still need to reload.
Another method is to empty the clip of a weapon you are holding. Before reloading, give it to an ally, and let them reload the weapon. After the reload animation, switch weapons again and you'll have a full clip of your original weapon.
A third method is to play Co-op, and continually kill your partner in a safe zone to amass a huge amount of dropped weapons.
Edit a level in custom games by pressing the X button on the controller on the main custom games screen. Then, you can set all weapons on the map to have unlimited ammo.
This glitch is accomplished by mostly just having the right timing. Pick up a weapon in player mode (Spartan Laser, Shotgun, and sniper rifles are the only weapons that have been tested and known to work so far) then fire your weapon and go to Forge Mode at nearly the same time (only a fraction of a second should be necessary). If done correctly, you will have lost some ammo, but then in about a second it will return, as if you never fired. This glitch will cause damage and it also has been noted to not work in local games.