The answer is really very simple , most steam engines are double acting , ie. steam is admitted to either side of the piston in turn so the piston is powered in each direction of travel.
It follows then that a twin cylinder engine has four power strokes per revolution , these power strokes are applied evenly to the crankshaft by setting the cranks at 90° to each other.
This arrangement also results in an engine that is self starting as at any position of the crankshaft there will be a piston in a power stroke position , whereas at 180° if one piston was at TDC then the other would be at BDC and the engine would not start without help turning the crankshaft.
I am currently building a three cylinder locomotive which uses 120° setting for the cranks , in effect a 6 cylinder engine , perhaps you can now work out the settings for a four cylinder locomotive such as the GWR King class.
Dan.