There is an excellent basic rule which will keep you out of trouble:
Lines and seams in one plane...on the wall or on the floor = grout'
lines and seams at a change of plane, i.e in a corner of the wall, or where the wall meets the floor = caulk. use matching, coordinating, or clear color.
The reason is that there will be flex at that change of plane. Caulk is plenty flexible enough to handle that, but grout is not.