The SUNRAY for Energy Act directs the Department of Agriculture to study and promote agrivoltaic systems, which combine solar energy production with agricultural activities like crop or livestock production on the same land. The bill requires the Secretary of Agriculture to conduct a comprehensive study examining how different crops and livestock can coexist with solar panels, assess economic viability across regions, and develop a five-year plan to support these systems. The legislation also mandates that the Agriculture Department establish a network of research and demonstration sites across different climate zones and issue national and regional guidance on protecting soil health during the siting, construction, operation, and decommissioning of solar projects on farmland. The bill authorizes $15 million annually from 2027 through 2031 to carry out the study and research activities, with the study results due to Congress within three years of enactment. The guidance on best practices must be completed within one year and updated at least every two years.