Water can cause vanities to warp, swell, crack, sag, or bubble. If your vanity is made of solid wood it will fare better than a vanity made of MDF (medium density fiberboard). If your vanity is constructed out of MDF, the damage, along with the possibility of mold growth, usually requires replacement.
First you need to access the damage. Has the damage been due to a long-term leak, extended exposure to high humidity, or is the vanity leaning or unstable? If the core foundation is compromised it is time to replace the unit. A vanity with a damaged foundation will not hold up long-term to supporting a heavy countertop.
If the veneer finish is just coming loose it is possible to easily repair it. Apply a strong, contractor-grade adhesive to affix the veneer back to the surface. Place a piece of wax paper over the damaged area and use a piece of plywood and a clamp to hold the veneer in place. Allow the repair to dry overnight.
If the vanity is solid wood and has water stains, you will have to sand the surrounding area, apply an oxalic wood bleach to remove the stains. You will then have to re-stain the damaged areas. It is important to remove all traces of the wood bleach before re-staining.
If the floor of the vanity is sagging or has visible mold present, it needs to be cut out and replaced. A saturated floor board, if left in place, and cause further damage to the vanity sides due to high humidity.