A loop would be used to display where the letter B appears in a data set because it allows for efficient and organized iteration over the elements in the set. Using a loop, a program can systematically check each element in the data set to see if it is the letter B, and then display the element's position or index in the set if it is found. This is more efficient and organized than manually checking each element in the set one by one. Additionally, a loop allows for easy modification and expansion of the program if the criteria for identifying and displaying the elements in the set changes in the future.