Yes, the shape of the body of a guitar greatly affects the sound it produces. The parlor guitars or the acoustic guitars that have the smallest body produce a balanced and light sound. They are the choice of people who want to focus on fingerpicking style for the quality of sound it makes.
The Orchestra Model is a mid-range size guitar that is known for its great volume, projection, and balance. This is the choice of guitarists who are always doing a solo or performs alone. The most common acoustic guitar shape is the Dreadnought.
It produces a lot of bass compared to the previous two guitars thus is popular to almost all singer-songwriters and guitarists in a band.
The shape of an electric guitar does affect the sound. The vibration of the guitar body somewhat influences the string vibration. It is not necessarily the shape by itself, but the composition of the guitars themselves. More massive guitars feature more significant volume for the sound waves to break through. Also, the combination of different Tonewood choices and the shape and size of the acoustic guitar.
The size of the acoustic guitar defines the tonal characteristics of a guitar model. Sizable guitars offer a larger scale. A more extended range means the tone is bright, crisp, and much louder. A shorter scale leaves more room for better sounding bends. It also allows the musician to express their emotions through the instrument and the song.