They all had defensive alliances with Prussia against France, which conveniently activated when the French declared war. But Bavaria in particular was uneasy about fighting alongside the Prussians and the government (as opposed to King Ludwig, who had been bribed enough to love the Prussians forever) was potentially amenable to switching sides.
As for whether they mattered, well, think of this. Bazaine's army went down, but the Prussian army pretty much gave its lifeblood at Gravelotte-St. Privat to get it there. The army that marched to Sedan and fought MacMahon's Army of Chalons was in every sense a "German" army; the Prussians were in equal number with Bavarians, Württembergers, and Saxons. Without von der Tann and his two corps, the Prussians would've been in a pretty tight spot. Notably, the Bavarians stormed Bazeilles, a key French strongpoint garrisoned by their elite marines (for comparison, Bazeilles has gone down in French military history along with Puebla). Unfortunately, their postwar reputation was somewhat tarnished by a few relatively minor incidents that the Prussians ended up blowing out of proportion, like a brief retreat in the face of French cavalry near the end of the battle of Sedan.
So yeah, I'd say they mattered.