When Homer Capehart was a senator from Indiana, he liked to tell how he dealt with criticism from his opponents. "They keep throwing lemons at me," he said, "and I keep making lemonade."

Sen. Robert T. Stafford (R-Vt.) is using a variant on the old Capehart approach as he battles to hold his lead against a hard-charging Democratic opponent. Standing on support that his own campaign acknowledges is as soft as a seashore sandcastle with the tide coming in, Stafford this week reached down and threw a little sand in his opponent's face.

In a radio debate Monday, Stafford read a lecture to his rival, former Vermont secretary of state James A. Guest (D).

"I think, Jim, that if you plan to come to Washington as a U.S. senator, you should remember that you're going to be living in a glass-bottomed bowl," Stafford said. "Vermonters elect husbands and their wives and send them down to Washington. I think it would be best for you and best for us if you did fully disclose now, not next year, all your resources and those of your family."

Stafford's Polonius-like speech was prompted by the reluctance Guest had shown to make public the specific value of his wealthy wife's holdings or to disclose their recent tax returns. It was delivered with the full authority of a Senate committee chairman and a 69-year-old man who was elected to his first office in Vermont a quarter-century before his 41-year-old rival even moved into the state.

It was cued by a phoned-in question about the Guests' money--a question Stafford and his campaign manager, Rey Post, say came as a complete surprise to them. It reappeared the next night at a sparsely attended candidates' forum in Rutland, where someone in a crowd liberally salted with campaign aides anonymously scribbled it onto a question card. It was picked up by radio and television interviewers, as Guest traveled the state this week, and dominated the newspaper stories of the campaign.

Finally, on Thursday, Guest called a news conference and threw the sand back at Stafford. Disclosing that their joint assets totaled $1.8 million and that they had paid $33,000 in taxes on an adjusted gross income of $105,000, he accused the senator of "dragging my wife into" the campaign and resorting to "innuendo and distortion . . . to avoid the real issues of the election."

But a whole week of the campaign had been consumed in the debate, and that was clearly what the Stafford campaign wanted.

The sand-throwing began soon after Guest captured the endorsement of the state AFL-CIO from Stafford, the second-ranking Republican on the Labor and Human Resources Committee, who has often thrown his vote in labor's direction.

And it came at a time when some prominent environmentalists in the state were endorsing Guest over the chairman of the Senate Environment and Public Works Committee, whose labors to preserve the Clean Air Act have earned him enthusiastic support of the major national environmental groups.

Ever since Stafford, a moderate Republican, emerged from the mid-September primary with only 46 percent of the votes against two conservative challengers, he has been struggling to hold together an unlikely coalition of support.

Much of his primary margin was from crossover votes of liberal Democrats, who are susceptible to Guest's appeals to come home. Stafford has to hold those Democrats while regaining the support of the Republican voters who backed his conservative rivals in the primary.

He has run a split-level campaign. His television ads are aimed at the independents and the Democrats. They stress his environmental record and chairmanship, his support for education as the chairman of the Labor and Human Resources education subcommittee, and his backing of the nuclear freeze, which emerged from town meetings.

Meanwhile, direct-mail appeals to Republicans have emphasized the importance of his vote in keeping the Senate Republican. Senate Majority Leader Howard H. Baker Jr. and Sen. Robert J. Dole have been booked into the state to reinforce the message to the faithful. And his two primary rivals have come through with endorsements--lukewarm from Stewart Ledbetter, a businessman who is considered washed up after two failing tries for the Senate, and enthusiastic from John McClaughry, a former White House aide who is considered promising for the future.

But in such circumstances, it is generally considered wise to keep the challenger busy and on the defensive, lest he focus his campaign on splitting the incumbent's shaky base of support. The Stafford-Guest race is a demonstration of how such tactics can be applied against a candidate who lacks a solid foundation.

Guest is an energetic man, who moved to Vermont a bit more than 10 years ago, after working on the staff of Sen. Edward M. Kennedy (D-Mass.) and on Sargent Shriver's 1972 vice presidential campaign.

A lawyer who has never practiced, he moved north to accept appointment as state banking and insurance commissioner, then was elected twice as secretary of state. For the last two years, he was the unpaid national president of Consumers Union.

Vermonters know Guest as an uninhibited campaigner, who likes to stand on well-traveled roads with a sandwich board sign reading, "Hi, I'm Jim Guest, candidate for U.S. Senate."

He also makes much of the fact that he posted a list of his campaign promises in the reception room of his secretary of state's office, and checked them off as he fulfilled them. The promises centered on making state government more accessible by such steps as installing 800 numbers.

But when Stafford emerged from the September primary, Guest began to show a more substantive side, reflecting what associates say were hours of intensive briefings on national issues.

The challenger is on the air with a series of issues spots, spotlighting his differences with the incumbent on Secretary of Interior James G. Watt, military spending, Social Security, taxes and the Reagan economic plan.

Although Vermont is far below the national average in unemployment, Guest is betting that he can tie Stafford to unpopular aspects of the Reagan record.

Stafford, in turn, stresses his independence--especially on environmental issues and education spending--and cites the value of his chairmanships to the state.

And when he sees the 20-point lead he carried into the last three weeks of the campaign may be in danger of erosion, he reaches down for another handful of sand.