Solar panels are made up of many solar cells. Solar cells are made of silicon, like semiconductors. They are constructed with a positive layer and a negative layer, which together create an electric field, just like in a battery.
When photons hit a solar cell, they knock electrons loose from their atoms. If conductors are attached to the positive and negative sides of a cell, it forms an electrical circuit. When electrons flow through such a circuit, they generate electricity. Multiple cells make up a solar panel, and multiple panels (modules) can be wired together to form a solar array. The more panels you can deploy, the more energy you can expect to generate.