The first is the type of tile you have. If you have porcelain or ceramic tile, then you won’t need to clean your grout as often as someone with natural stone tile. The second factor is the color of your grout. Light-colored grout will show stains more easily than dark-colored grout, so it will need to be cleaned more frequently.
In general, you should aim to clean your grout at least once a month. If you have light-colored grout or natural stone tile, you may need to clean it more often. If you don’t clean your grout regularly, it will become stained and discolored, and it will be much harder to clean.