Solar energy technology will soon be widely used in the home, industry and agriculture - sooner than most Americans suspect - according to one solar energy expert.

Denis A. Hayes, who has just completed a global study of solar energy applications and potential, says, "It all depends on whether the government takes the right steps."

Hayes, is a researcher at the World Watch Institute, a private nonprofit study group on global resource problems.

Solar energy use has lagged, Hayes says, because solar technology has not had the same tax incentives that oil and natural gas production have enjoyed over the years, including the depletion allowance and deductions for intangible drilling costs, or the federal funding devoted to nuclear power.

Hayes calls for a vigorous solar effort, citing evidence that the United States and every other country in the world could meet all of their energy needs from the sunlight that strikes their buildings.

The biggest immediate payoffs will come from using existing technology to heat and cool buildings, and especially to heat water, he says.

More than 2 million solar water heaters have been sold in Japan, a country that depends almost entirely on oil imports, and tens of thousands are installed in Israel.And until the 1950s, solar water heaters were in wide use in Florida and California.

Hayes says that the key to an aggressive solar program is "substantial government intervention" such as a government mandate in energy-short northern Australia that all new buildings must use solar water heaters.

The U.S. solar industry is growing. Some industry forecasters predict that 2.5 million homes will use solar heating and cooling by 1985. And Hayes notes that production of solar collector's this year is expected to triple last year's output, amounting to 1 million square feet.

Obstacles remain, however. For instance, there are currently some 30,000 independent building code jurisdictions in the United States, all of which have their own rules concerning what can and can't be used in construction.

And costs remain high. Systems for home heating and cooling range up to $10,000.

To move beyond these constraints, Hayes says, the government must put solar energy on an equal footing with oil, natural gas and nuclear power by offering tax credits and, where necessary, subsidies to homeowners and industry.

James R. Schlesinger, the President's chief energy adviser, is reviewing a list of tax incentives and grant programs for solar heating and cooling that will be included in the President's April 20 energy message.

Hayes, sees great potential in further development of photovoltaic cells, which convert direct sunlight into electricity through the use of photoelectric processes in semiconductor.

Developed initially for the space program, photovoltaic cells are still cost-prohibitive, costing 20 to 40 times more than convential electricity sources. Again, Hayes says that government must stimulate production to lower per-unit costs.

Other forms of power which Hayes says can provide significant sources in then near term are wind power and processes which convert animal, plant and industrial wastes to readily useable energy.

One well-publicized such operation, Calorific Recovery Anaerobic Process, Inc., was authorized by the Federal Power Commission in 1976 to furnish a pipeline company with 820 million cubic feet of methance from feedlot residue.

While admittedly optimistic about solar energy's future, Hayes says the United States can produce the equivalent of 14 million barrels of oil a day, about20 per cent of expected total energy demand, by 1990.