For styles of music that predominantly depend upon playing solos and melodies with a pick, guitarist prefer guitars with narrow necks.
For styles of music that predominantly depend on strumming chords with a pick, and using lots of barré chords, guitarists prefer instruments with necks of intermediate width.
For styles of music that involve intricate counterpoint (more than one musical line being played on the guitar at the same time) and playing with several fingers rather than with a pick, guitarists prefer very wide necks.
Traditional classical, nylon string guitars have a nut width of 52mm, the widest width you can usually find, because classical guitar music requires very intricate fingering work for both hands. You need the extra space between strings to play that style of music, and classical guitar music rarely involves things like barré chords.
Various options are available among different kinds of guitars. Neck widths at the nut (the end of the neck near the headstock) for six-string guitars vary between about 39mm and 54mm, which, to a guitarist, is a huge variation.
Also, guitars vary in the width of the string spacing at the opposite end, at the bridge. Generally a guitar with a wider nut will have a proportionally wider bridge spacing, but there are variations among the many types of guitars on the market.
Selecting a guitar with a nut width and string spacing that suits your style of playing is something worth thinking about, at least for an intermediate or advanced guitarist.
There's another factor that varies with different kinds of guitars, the fingerboard radius.
Classical guitars have a completely flat fingerboard (no radius at all), which works well for that style of music -- intricate fingering, where you don't strum chords much at all. (I find that trying to play barré chords on a classical guitar is quite uncomfortable and fatiguing to the hand.)
Fender electric guitars, traditionally, have a pronounced curve to the fingerboard (7-1/2 inches or 190mm) that makes it really comfortable to play barré chords.
Most Gibson electric guitars traditionally had less curvature to the fingerboard, with a radius of 12 inches or 300mm, which seems to be more comfortable for playing solos and for bending strings.
Acoustic steel-string guitars usually have even less curvature to the fingerboard (around 15 inches or 380mm).
A recent development in electric guitars is the compound radius, where the surface of the fingerboard is a section of a cone, to use the geometrical term. At the nut end of the neck, the curve is prounounced, but the curve of the fingerboard gradually flattens to less of a curve as you move up the neck. The idea behind this is to have the "best of all worlds" to make it a bit more comfortable to play many styles of guitar on one instrument.
(In this illustration the amount of curvature is greatly exaggerated for effect)