Are 4 sets of 8 reps the best for gaining muscle mass?

If you are looking to gain muscle mass then doing progressive training is the best way for this to be achieved. Having the goal of adding more weight to the bar each workout and doing a low number of sets and reps is key to having success with this type of training.
Performing the compound exercises which target several muscle groups through the lifting and lowering of the weight. Makes it much easier for you to handle more weight since all the muscles are working together.
Some of the best compound exercises to add to your routine are the Bench Press, Upright Barbell Rows, Squats, Deadlifts and any other barbell exercise that use several muscle groups to help lift the heavy weight.
Since all your muscles are complementing each other's strengths when you are performing the exercise it is much easier to keep good form throughout the movement of the exercise. You only really need to do a low number of sets and reps to stimulate muscle growth and add more strength to your muscles.

Read more here about the science behind gaining muscle quickly