it was a scientist called Becquerel who first discovered that some materials produced electricity when they were exposed to light. He called those materails “photovoltaic”. This was back at 1839. By 1950 the americans were looking to provide their satelites with a renewable energy source so they did not need to carry loads of fuel to last them for 10-20 years that they were going to be in space. They decided to use the photovoltaic materials such as silicon to generate electricity from the sun when the staelite was in space. They packed the photovoltaic materials into panels that we now call solar panels. This was back in 1950s!
Something else you may like to hear. All the computer chips are made from the same type of materials as photovoltaics (they use silicon!). After the scientists made the solar panels from photovoltaic materials in 1950s they used their knowledge of silicon to make the first computer chips!