I was wondering what determines the height/width ratio of a rocket? What are factors that influence the choice between a tall skinny rocket like Falcon 9 or a wider shorter (in ratio) like Ariane 5 or GSLV?
What determines rocket height/width?
If there had to be a concise answer, it would definitely be @JCRM's answer that it's an optimization of a series of compromises. But there'd have to be a caveat for the smallest rockets.
Those are a mix of design, budget, and schedule compromises.
Rocket designs often (but certainly not always) evolve from previous designs, and inherit working and proven subsystems and states. This answer to Why does PSLV use four stages to get to LEO, and why do they alternate solid, liquid, solid, liquid? explains one example of heritage nicely.
But there is no question that for atmospheric rockets the size has something to do with it. Aerodynamics and especially drag kicks in at the low end of size. For a fixed height/diameter ratio rocket, as the size goes down, the drag decreases as only mass to the 2/3 power whereas thrust may decreases roughly linearly, and drag slowly overcomes thrust.
The only way you can deal with this is by making the rockets inordinately long and skinny to minimize the drag associated with the cross section. Strength, and drag along the sides of the rocket limit the practicality of this. Also note that even with the extreme ratio, it's rare for a sounding rocket to achieve orbit. See this answer to the question Will JAXA try again to launch TRICOM-1 with the “world's smallest orbital rocket” SS-520-4 again? as well as answers to How small could an orbital rocket be?.
The best way to get at all of this is to look at the extremes, so I'll compare sounding rockets to the Saturn V, and a few points in between, and one notable, pasta-based exception.
Sounding rockets have the most extreme aspect ratio. The Black Brant series shown below makes a good example. According to Wikipedia the Black Brant 10 is 14.5 meters tall and 0.44 meters in diameter (at the base) which is a height/diameter ratio of about 33:1 and has a mass of 2.6 mt.
Towards the other end of the spectrum, and even ignoring any side-mounted boosters the Delta IV Medium has a height/diameter of 62.5/5.0 = 12.5:1 and a mass of 283 mt, and the Ariane 5 ES has a height/diameter of 50.5/5.4 = 9.4:1 and a mass of 773 mt.
And for the largest flown rocket, the Saturn V at 110.6m tall and 10.1 meters in diameter at the base, the height/diameter 11:1 and mass was about *2970 mt**.
Wikipedia says F9 FT is 70 meters high and 3.7 meters in diameter, a height/diameter ratio of nearly 19:1 and a mass of 549 mt.
Except for the sounding rockets, most rockets fall in the 9:1 to 15:1 range, with a slight but noisy trend to smaller ratios for the most massive rockets.
However, the question If not constrained by underpasses, etc., would Falcon 9 have been less of a flying noodle? addresses the unusually extreme aspect ratio of the Falcon 9 and links and asks if it would be shorter/fatter if not for the requirement to travel by US highways and through tunnels.
It links to the question Why is Falcon 9's shape so tall and skinny?.
@geoffc's answer says in part:
SpaceX manufactures their booster in Hawthorne, CA. They then truck it on the highways to McGregor, TX for test firing with all 9 engines.
Then it is back on a truck for the drive to Florida to LC-40 at the Air Force station for launch.
The diameter of the booster at 12 feet/3.6 meters is the largest they could go and still be road transportable.
So the F9 is a flier from the cluster in the 9 to 15 range only for a particular bit of rocket heritage, the F9 was born on the road.
Script for plot: https://pastebin.com/Sz26Jz8K makes it easier to add more rockets in edits.
rocket mass (mt) height(m) diam(m) h/d Saturn V 2970 110.6 10.1 11.0 Ariane 5 ES 773 50.5 5.4 9.4 Falcon 9 FT 549 70.0 3.7 18.9 'flying noodle' Delta IV medium 283 62.5 5.0 12.5 Electron 12.5 17.0 1.2 14.2 Black Brant 10 2.6 14.5 0.44 33.0 sounding rocket
Source: Gunter's Space Page: Black Brant left: Black Brant-9 (SOAREX 8) [NASA], right: Black Brant-10 (NASA 12.073) [NASA]
below: GIF of Falcon 9 faster than normal speed to make the noodle-moniker evoking motion more visible, from the YouTube video SpaceX B1021: The First Rocket to Fly Twice (a supercut of highlights