I want to know how much light is there for a spacecraft that flies from earth to Proxima Centauri. I know there's the sun but what happens after the spacecraft leaves the solar system? Are there stars that provide enough light for solar panels to work?
No, the power collected by solar panels is reduced by the square of the distance from the light source.
At the Earth's distance from the sun, the energy of sunlight is about 1300 watts per square meter, of which something like ~30% can be converted to electricity by solar panels. Once the sun is far enough away to be "just another star", the total starlight is about 8 orders of magnitude dimmer, something like a microwatt per square meter. If I've done my math right, powering the ISS from interstellar starlight would require solar panels about the size of California.
Sunlight doesn't provide enough power for solar panels to be useful even in the outer solar system, let alone interstellar space, so probes going beyond Mars orbit more often use radioisotope thermoelectric generators (RTGs) for power, which work for decades and do not depend on light.
For interstellar journeys which will take hundreds of years, nuclear fission or fusion reactors would probably be necessary.