It depends on what is in the reaction mixture. Generally, washing with acid will protonate any bases and the resulting salt will be more soluble in water (relative to organic layer), on the other hand washing with base will deprotonate any acids, forming salts, which again are more water soluble (relative to organic layer).
So for example, if you have pyridine in your organic layer you can wash with dilute HCl to remove it as the more water soluble pyridinium chloride. If you had acetic acid in your organic layer you could wash with saturated sodium bicarbonate to remove it as the more water soluble sodium acetate.
If your product is an organic acid though, you probably wouldn't want to wash that with base, likewise if your product was, for example, an amine you probably wouldn't want to wash it with acid as you may pull it into the aqueous layer.