There is no need to disconnect the battery, however you can if you wish to. It will run on AC power alone, just fine.
The Lithium-Ion batteries used on Apple laptops have no "memory effect" and a very long service life, and you don't need to take any special measures to prolong their operating life. Older Nickel-Metal-Hydride batteries required users to fully discharge and recharge the battery on a regular basis, and mercury-based rechargables required frequent recharging, both measures to combat the battery "memory effect". There is no need to worry about this on a modern laptop, though.