will a 1n4001 diode work as a blocking diode for a solar panel?

Up to its 1A current rating, yes it will. Above that, find a bigger diode !

AndyGadget6 years ago

+1 to Steve's answer, but if you're using only a small solar panel and you're trying to squeeze as much from it as possible, use a schottky or germanium diode which has a lower voltage drop.