Uniform terraced town houses emerged in London immediately after the Great Fire. The government recognised both the urgency of regeneration for the thousands of now-homeless families, but also the requirement that this activity needed to be strictly regulated to eliminate the factors which contributed to the Fire in the first place. The Rebuilding Act of 1667 laid down the rules for domestic accommodation. Depending on the area and type of street, houses were specified as being of the First Sort (two storeys plus basement and garret), the Second Sort (three storeys plus basement and garret) and the Third Sort (four storeys plus basement and garret).
Projectors such as Nicholas Barbon and others set to work. Terraced housing proliferated through the late Stuart and Georgian periods, all complying with the Act. There are many of these rows of houses in London today, very fine examples to be found in Spitalfields and the Temple district (both areas untouched by the Fire), but elsewhere too. A good one is the Benjamin Franklin House in Charing Cross, recently covered.
Update: Good coverage on this and subsequent legislation by buildings sleuth Ellen Leslie, here.