West Germany's Free Democratic Party, the junior member of the ruling national coalition, suffered humiliating setbacks in two state elections yesterday.

Results from the city-state of Hamburg in northern Germany, and from the neighboring state of Lower Saxony indicate that the Free Democrats received less than 5 percent of the vote in both places and therefore will no longer be represented in the parliament of either state.

The outcome is certain to have major repercussions in Bonn, where for nine years the Free Democrats have been joined with the much larger Social Democratic Party of Chancellor Helmut Schmidt. Schmidt's party increased its vote in the two states.

The failure of the Free Democrats in Lower Saxony means that the opposition conservative Christian Democrats will have an absolute majority in that state. That will increase the majority that the opposition conservatives already have in the upper house of the federal parliament and therefore make passage of legislation by Schmidt's government more difficult.

The ruling federal coalition maintains a slim 10-seat majority in the lower house. If the opposition should eventually gain a two-thirds majority in the upper house, it would be able to block the government on key pieces of legislation. This could make the federal government powerless and theoretically, at least, bring it down.

In October, two more state elections will determine whether the Christian Democratic Party and its sister party in Bavaria, the Christian Social Union, will reach the two-thirds upper house majority.

Yesterday's results will also fuel the dispute among the Free Demcorats about whether they should continue their coalition at the federal level with the Social Democrats into the 1980 federal election.

One key reason the Free Democrats got knocked out of the Lower Saxony parliament is because an environmental party - opposed to nuclear power plants and nuclear waste disposal plans for the state - pulled almost 4 percent of the vote, mostly at the expense of the Free Democrats. The strength of feeling on environmental issues has been consistently underrated by Bonn's politicians.

The elections were the first test of voter sentiment since the federal election of 1976.

The Free Democrats dropped from 10.9 percent in Hamburg state elections of 1974 to 4.7 percent. Parties must get at least 5 percent to be represented in the local parliament.

The Social Democrats chalked up a huge gain in Hamburg Chancellor Schmidt's home town, jumping from 44.9 percent to 51.8 percent. The Christian Democrats in Hamburg dropped from 40.6 percent to 37.8

In Lower Saxony, the Free Democrats dropped from 7 percent in 1974 to 4.2 percent. The Social Democrats gained slightly from 42.1 percent to 43.1, and the Christian Democrats dropped a fraction from 48.8 percent to48.6.