Several counties and towns in Southwest Virginia received a federal grant to help develop solar energy in the area.