THE POLITICAL PROS are looking closely at a set of races, this year and next, that normally get little national attention. These are the elections in which members of state legislatures are chosen. Their importance is that in 1981 and 1982 the new legislatures will change the boundaries of most congressional districts. That decennial struggle for political control of the way those boundaries will be changed has been sharpened by the possibility that skillfully programmed computers can turn the crude art of gerrymandering into a sophisticated takeover of congressional delegations.

In an effort to head off that possibility, Sens. John C. Danforth (R-Mo.) and Gary Hart (D-Colo.) have introduced legislation that, for the first time, would put federal controls on the way states carve out those districts. They want to take the power to draw the new boundaries away from the legislatures and put it in the hands of bipartisan commissions, which would operate under strict standards. Congressional districts, in their view, should not only be composed of equal numbers of residents but should also be compact and contiguous and should have boundaries that generally coincide with existing political subdivisions and do not arbitrarily cut through voting blocs of racial or ethnic groups.

Understandably, state legislatures don't want to give up the power they now have to draw those district lines. Ever since Elbridge Gerry invented the gerrymander more than a century and a half ago, playing with those lines to maximize the number of Democrats or Republicans in "safe" districts has been the dream of many state politicians. While the establishment of federal standards to guide redistricting may be a good idea, taking the job itself away from state legislatures is not. Drawing district boundaries is a political act, whether performed by a legislature or a "bipartisan" commission, and it should remain in the political arena if the states want it to remain there.

The creation of federal standards, however, might conceivably persuade legislatures not to attempt some of the more exotic line-drawing possibilities that computers will make possible. Federal judges could enforce those standards, and the experience of the states with judicially drawn district lines is not one that would lead many legislatures to invite a repetition. Since the federal courts are already deeply into this "political thicket," it might be useful to them - as well as to the cause of ending the more indefensible forms of the gerrymander - for Congress to spell out how it believes congressional district lines should be drawn.