The Riksdag goes back to the Meetings of the Realm (Riksmöten) that started already in the early 15th century; traditionally Arboga möte (meeting at the town of Arboga) in 1435 has been regarded as the very first truly representative Riksmöte, but modern research is now doubting this.
During the 16th century the Riksdag slowly became more formalized, culminating in laws of l617 and 1634 that regulated the four estates and what authority the Riksdag had. The farmers (I wouldn't say the peasants; we're not talking about people just making a living, we're talking about well-to-do farmers, owning their land) were not regarded as the equals of the other estates since they had no access to the secret committee (sekreta utskottet), where policies were really set, until 1809.
This Riksdag made up of the four estates lasted until 1866 when it was replaced by the Riksdag of two chambers (kammare) or houses. The members of the first chamber (upper house, senate) were elected by electors, while the members of the second chamber were elected directly by the people. To qualify for the first chamber you had to be quite wealthy.
In 1970 the the Riksdag of two chambers was replaced by the present Riksdag, which has only the one chamber, and where all 349 members are elected in direct elections.
How were the members of the estates elected then? Well, this was regulated in law.
The Nobility sent the heads of the different families.
The Clergy had to send all the Bishops (13) and the Vicar of Storkyrkan (main church in Stockholm), as well as representatives for vicars and curates elected among themselves.
The Burghers had to send the Mayors of all towns; the rich merchants of the major cities were also represented by their own elected members, sometimes also craftsmen were represented.
The Farmers had to send one farmer from every härad, judicial district. These representatives were not your average farmer or crofter; these were men already in a position of authority (e.g. nämndeman), with large farms.
So, some of the representatives were there because the law said they had to be, and some were there because they had clout. For these last there were no special qualifications demanded by law, but generally speaking poor young men with no connections were not being sent to the Riksdag.
But, it has to be realized that not all members of the estate Riksdag voted in the Riksdag. What happened was that the different estates met separately to discuss the issues, and decided what they thought about them and how they were going to vote. Then one speaker for each estate voted on the issues - a total of four votes were cast in the actual Riksdag.
This explains why there was no set number of representatives, very few formal qualifications and why it didn't matter if the estates did not have the same number of representatives.
Until the early 18th century the Riksdag did not meet regularly, and was - most of the time - a rather weak institution. This was particularly true 1680-1718 was Sweden an absolute monarchy. From 1718 the Riksdag met every three years. In 1772 we again absolute monarchy, a state of affairs that lasted until 1809 when Gustavus IV Adolphus was deposed.
Ingela