As a rule-of-thumb, you should seal your grout annually. However, you should consider sealing grout every six months in very high traffic areas and every two years in very low traffic areas, such as guest bathrooms that get infrequent use.
In reality, it can be hard to know what’s right for a given situation. This is especially true in new homes or in pre-owned homes where you have no idea what was done in the past.
Proper maintenance requires you consider the type of tile and whether it needs to be sealed. Then consider the type and quality of grout used along with how heavily you use the area to decide on an appropriate sealing frequency. Create a maintenance schedule and then stick to it.
If in doubt, call a tile setter to help you better understand what you have now and how best to maintain it.
An easy way to determine if you need to reseal is to spray water on your tile and grout lines to see what happens. If the water is absorbed (does not bead up) there may not be any sealer in place at all or the sealer may have failed and it’s time to reseal.