There's no question that the crew of the Yorktown failed in their attempt to produce power with a solar sail. A solar sail is a means of propulsion, not power generation. A solar panel would create power. Sadly, the incompetent engineers were unsuccessful and everyone died.
YORKTOWN CAPTAIN: (on viewscreen) Our systems engineers are trying to deploy a makeshift solar-sail. We have high hopes that this will, if successful, generate power to keep us alive.