When to select a red light or IR photoelectric sensor?

What is the advantages of using a red light over a IR photoelectric sensor? or vice versa?

Any applications for either to show the working principle? Thanks in advance!