Grouting too early is one of the few tiling mistakes a homeowner can make on their own, usually while trying to get a bathroom back into use. The waiting time depends almost entirely on which type of adhesive was used.
Cement-based adhesive
This is what a professional will use for almost any substantial job, mixed from powder on site.
It does not dry so much as cure, through a chemical reaction with the water in the mix. Standard versions need around 24 hours before grouting. Rapid-set versions cure in three to four hours, which is why they are used where a bathroom has to be back in service quickly.
Because it cures rather than evaporates, it works under non-porous tiles and in thicker beds, and it reaches full strength over the following days.
Ready-mixed adhesive
Supplied in a tub, ready to use, and popular for small DIY jobs because there is no mixing.
It dries by evaporation, which is the problem. The water has to escape, and it can only do so through the tile joints or into a porous substrate. Under large porcelain tiles with thin joints, on a non-porous background, that can take days rather than hours.
Grout it too early and you seal the remaining moisture in. The adhesive never reaches strength, and the tiles can be lifted off months later still slightly soft underneath.
Ready-mixed is also unsuitable for floors and for wet areas. Use cement-based for anything that matters.
What changes the timing
Substrate porosity. A porous background such as plasterboard or fresh render absorbs some of the water and speeds things up. A sealed or non-porous background slows it.
Tile porosity. Ceramic tiles let some moisture through. Porcelain and glass are effectively impermeable, so everything has to leave through the joints.
Bed thickness. Levelling an uneven wall with a thick bed of adhesive takes considerably longer than a thin, even one.
Temperature and ventilation. Cold slows curing significantly. An unheated bathroom in a Victorian terrace in January is a slow environment. Do not try to force it with a heat gun or a fan pointed at the tiles, which dries the surface while the depth stays wet.
Floors
Wait a full 24 hours before walking on a newly tiled floor with standard adhesive, and longer before putting heavy loads on it. Walking on tiles before the adhesive has set breaks the bond and you will not know until they start moving.
If underfloor heating is present, leave it off. Manufacturers typically specify a period before it is switched on, and then a gradual increase rather than straight to full temperature.
Why professionals are less bothered by this
A tiler working through a bathroom over several days is naturally leaving the right intervals: walls one day, floor the next, grout the day after. The sequence builds the waiting time in.
The problem arises on small jobs done in an afternoon, where the temptation is to grout the same evening. Read the bag, check whether it is rapid-set, and if it is not, wait.