Good question.
There's a lot of serendipity involved here, since it was a successful experiment demonstrating something completely different from what they intended. They didn't know about electron spin, their intent was to measure what they called the 'directional quantization' (richtungsquantisierung) of the electronic 'orbits' within the Bohr-Sommerfeld model, i.e. what we now call the magnetic quantum number.
I think they chose silver simply because it's relatively easy to produce a vapor of silver atoms. That was a lucky choice, since we now know silver is s1d10 and has no orbital magnetic moment, so they ended up seeing the electronic spin magnetic moment instead. Then they had luck again, since they first couldn't see the silver deposit on their plate, but happened to be smoking cheap cigars. The hydrogen sulfide from the cigar smoke reacted to form black silver sulfide and "developed" the spots.
So they made the wrong choice when it came to finding what they intended to look at, but the right choice in terms of finding out what the Stern-Gerlach experiment is now famous for having found out - electron spin.