Making a solid rocket, that is large enough to be useful for orbital launch is quite hard.
You cannot fuel it on the pad, so the fuel has to be cast into the booster where it is manufactured. Thus it is very hard to transport after that, since a large SRB is VERY heavy. And often very long. So you cannot ship it by truck or even train.
Thus the Shuttle SRB's are made in segments so they can be transported from Utah to Florida via train. Length is an issue since the curves of the train tracks limit it before it might impinge on a train on the parellel set of tracks.
There is a great story, how the size of the SRB's is directly related to the size of a horses arse.
The SRB segment in length and width cannot exceed the ability to transport by rail. This is dependent on the gauge of the rail (distance between the two rails. Narrow gauge (Russia) and wide guage (US/Europe in some places) are common. Toronto subways as a fun example use a third size just to be different) Rail gauge is based on the Roman roads that still exist in some places in Europe. The width of the road was determined by a wagon with pairs of horses pulling it. Thus the direct connection.
Solids can have awe inspiring amounts of thrust (SRB at 2.8 million lbs of thrust, compared to F-1 or RD-170 engines at 1.5 Million lbs thrust. They are sort of the largest liquid engines seriously built) but their ISP is usually lousy. This is why they are often used as lower stages where thrust matters but ISP is less relevant.
Which is why it is always interesting when you see a design for a booster with a solid upper stage.
And yet, conversely, kick stages, sometimes a baby 4th stage, or even 5th stage can be solids. The Star line of motors is pretty common in commercial use. There, solids scale better for the size, do not need huge performance, just need that last little bit of impulse.