Things need to be dry before you caulk...depending on the conditions, that may take several days. A fan in there can help.
Some caulks need to cure for several days before you can let them get wet, as well.
You didn't indicate what caused you to replace the caulk. What symptoms are you seeing that indicated you needed to replace it?
If the depth of the caulk is large, you should consider filling some of that space with foam backer rods.
Alcohol can be used to help clean up the surfaces prior to caulking.
Tile and grout is NOT waterproof, so hopefully, the surface (assuming there IS tile in this equation) below the tile was prepared properly with a moisture barrier.