Sealing your grout can protect it from bacteria, water damage, staining, and other maladies. Your grout also protects your tile, so even if you only seal your grout, you can think of it as a protective measure for your tile.
You should seal your grout when the tile is first installed or when you re-grout your tile. You should then re-seal your grout every year or so to continue protecting your grout and tile. You just need to make sure