When to use one in front of the other depends on the action you want to perform.
First of all, lets go through their definitions (stated on world.episerver.com)
IContentRepository
"IContentRepository is the primary API that defines repository methods for IContent objects [...] Through the repository, you can perform CRUD (Create, Read, Update, Delete) operations and other operations on content instances such as listing and move (that is, instances implementing EPiServer.Core.IContent)."
IContentLoader
"Describes a service that can be used to read content data objects from a repository."
As the definition states, IContentLoader is used for reading content, e.g. it does not support all of the CRUD performance.
Anecdote: The IContentRepository implements the interface IContentLoader.
Shorter answer:
Use IContentRepository when you plan on modifying content/data in the repository.
Use IContentLoader when you only plan on reading content/data in the repository.
Hope this clarifies it for you!