For a long time, rest periods of ~30-90s were the norm for muscle growth. After a training session with short rest periods, there’s a spike in anabolic hormone production, mainly growth hormone , and it was hypothesized that this spike in anabolic hormones was then causing the muscle to grow. This is called the Hormone Hypothesis, and led us to think that shorter rests are the way to go if you want to get big.
However, the research we have on the topic does not support this idea:
Souza Junior et al.  found similar hypertrophy in a group resting 2 minutes between sets vs. a group starting at 2 minutes rest and decreasing 15 seconds each week until they reach 30 seconds rest in the last week of the study. The group resting always 2 minutes did more total volume (+9,4% in the bench press and +13,9% in the back squat).
Another study by Souza-Junior et al.  with the same design as the previous also found similar hypertrophy in both groups, and more total volume performed by the 2-minute rest group.
Schoenfeld et al.  compared one group doing 3x10 with 90 seconds rest between sets vs. another doing 7x3 with 3 minutes rest, and found no differences in muscle growth between groups.
Schoenfeld et al.  found that resting 3 minutes between sets resulted in greater muscle growth when compared to resting 1 minute between sets. The authors recommended a minimum of ~2 minutes rest between sets to maximize muscle growth.
In a review paper by Henselmans & Schoenfeld , the authors concluded that “to date, no study has demonstrated greater muscle hypertrophy using shorter compared with longer rest intervals” and that “the literature as a whole suggests that rest interval manipulation has minor effects on muscle hypertrophy compared with other training parameters such as work volume, which suffers when inter-set rest is insufficient”. This last point is supported by several studies [7,8,9]: all of them (plus the first two referenced here) showed that short rest periods decrease the number of reps you can perform per set, lowering total volume. This might reduce the magnitude of stimulus, because volume seems to be an important variable for hypertrophy, as several studies have shown that volume has a dose-response relationship with hypertrophy [10,11,12,13].
A systematic review by Grgic et al.  concluded that the findings “may suggest the use of longer inter-set rest durations (>60 s) when the goal is to maximize muscle hypertrophy, as it allows training with a higher overall volume load.” It also states that training intensity and the type of exercise may impact how much you should rest: going to failure might require more rest, as do compound movements, because they are more demanding and fatiguing. Machine-based isolation exercise might require less rest.
Besides these studies on the impact of rest periods on muscle growth, there’s also some evidence that goes against the Hormone Hypothesis: McKendry et al.  compared a group resting 5 minutes vs. another resting 1 minute between sets and found that there was a greater anabolic response in the short rest group, but there was also an attenuated myofibrillar protein synthesis and intracellular signaling during the early post exercise recovery period. This actually means that the stimulus produced by sessions with short rests is weaker, which is no bueno if you're trying to maximize muscle growth. Besides that, the spike in anabolic hormones, especially growth hormone (GH) does not cause growth. That happens because one of the functions of GH is fuel mobilization and, when you rest very little, fuel must be mobilized faster.
Putting it all together, most of the research shows no differences or either a possible benefit to resting longer for muscle growth. There’s also evidence that using very short rest periods decreases myofibrillar protein synthesis and the number of reps per set you’re able to do. This last point means less total volume, which means a lower magnitude of stimulus to the muscles. I will also add that, from my personal experience, resting longer also helps with psychological recovery, which is in my opinion very important, especially in heavy compound movements, because it can increase your ability to train close to muscular failure.
If your goal is muscle growth, your intent in the gym should be to work your muscles, not the cardiovascular system. Take your time, rest at least 2 minutes between sets and enough to feel like you’re ready to perform another high-quality set. Although you choose different rest periods for different exercises, make sure you standardize them: if you choose to rest 3 minutes between sets of bench press on Monday, make sure every Monday you rest ~3 minutes between sets of bench press and not significantly more/less.
Rest at least 2 minutes between sets and enough to feel like you’re ready to perform another high-quality set.
You can (and probably should) rest even longer in compound heavy movements (especially if you’re really strong). These require more time to recover from neuromuscular and psychological fatigue.
Standardize your rest periods for each exercise.
 Schoenfeld BJ, Postexercise hypertrophic adaptations: a reexamination of the hormone hypothesis and its applicability to resistance training program design. J Strength Cond Res. 2013 Jun;27(6):1720-30.
 Souza-Junior TP, Fleck SJ, Simão R, Dubas JP, Pereira B, Pacheco EM, Da Silva AC, Oliveira PR. Comparison between constant and decreasing rest intervals: influence on maximal strength and hypertrophy. J Strength Cond Res. 2010 Jul;24(7):1843-50.
 Souza-Junior TP, Willardson JM, Bloomer R, Leite RD, Fleck SJ, Oliveira PR, Simão R. Strength and hypertrophy responses to constant and decreasing rest intervals in trained men using creatine supplementation. J Int Soc Sports Nutr. 2011 Oct;8(1):17.
 Schoenfeld BJ, Ratamess NA, Peterson MD, Contreras B, Sonmez GT, Alvar BA. Effects of different volume-equated resistance training loading strategies on muscular adaptations in well-trained men. J Strength Cond Res. 2014 Oct;28(10):2909-18.
 Schoenfeld BJ, Pope ZK, Benik FM, Hester GM, Sellers J, Nooner JL, Schnaiter JA, Bond-Williams KE, Carter AS, Ross CL, et al. Longer Interset Rest Periods Enhance Muscle Strength and Hypertrophy in Resistance-Trained Men. J Strength Cond Res. 2016 Jul;30(7):1805-12.
 Henselmans M, Schoenfeld BJ. The effect of inter-set rest intervals on resistance exercise-induced muscle hypertrophy. Sports Med. 2014 Dec;44(12):1635-43.
 Senna GW, Figueiredo T, Scudese E, Baffi M, Carneiro F, Moraes E, Miranda H, Simão R. Influence of Different Rest Interval Lengths in Multi-Joint and Single-Joint Exercises on Repetition Performance, Perceived Exertion, and Blood Lactate. J Exerc Physiol Online. 2012 Oct;15(5):96-106.
 Willardson JM, Burkett LN. A comparison of 3 different rest intervals on the exercise volume completed during a workout. J Strength Cond Res. 2005 Feb;19(1):23-6.
 Senna G, Willardson JM, De Salles BF, Scudese E, Carneiro F, Palma A, Simão R. The effect of rest interval length on multi and single-joint exercise performance and perceived exertion. J Strength Cond Res. 2011 Nov;25(11):3157-62.
 Schoenfeld BJ, Contreras B, Krieger JW, Grgic J, DelCastillo K, Belliard R, Alto A. Resistance training volume enhances muscle hypertrophy but not strength in trained men. Med Sci Sports Exerc. 2018 Aug;51(1):94-103.
 Schoenfeld BJ, Ogborn D, Krieger JW. Dose-response relationship between weekly resistance training volume and increases in muscle mass: A systematic review and meta-analysis. J Sports Sci. 2016 Jul;35(11):1073-1082.
 Krieger JW. Single vs. multiple sets of resistance exercise for muscle hypertrophy: A meta-analysis. J Strength Cond Res. 2010 Apr;24(4):1150-9.
 Radaelli R, Fleck SJ, Leite T, Leite RD, Pinto RS, Fernandes L, Simão R. Dose-response of 1, 3, and 5 sets of resistance exercise on strength, local muscular endurance, and hypertrophy. J Strength Cond Res. 2015 May;29(5):1349-58.
 Grgic J, Lazinica B, Mikulic P, Krieger JW, Schoenfeld BJ. The effects of short versus long inter-set rest intervals in resistance training on measures of muscle hypertrophy: A systematic review. Eur J Sport Sci. 2017 Sep;17(8):983-993.
 McKendry J, Pérez-López A, McLeod M, Luo D, Dent JR, Smeuninx B, Yu J, Taylor AE, Philp A, Breen L. Short inter-set rest blunts resistance exercise-induced increases in myofibrillar protein synthesis and intracellular signaling in young males. Exp Physiol. 2016 Jul;101(7):866-82.