These fine gentlemen have it covered; I would add one comment. Some rigs pump excessively when moored in a crosswind. A babystay can minimize this as well when tensioned.
If your rig seems stable under sail without the babystay, by all means stow it as it makes tacking and spinnaker pole handling much easier. You may want to re-attach it if the rig pumps at the dock. Then you would also have it still handy for those few days where the sea conditions would advise using it under sail.