I think a hydrogen fuel cell could be powered by solar energy-but I'm not exactly sure how.
Yes, they can. But it's a kind of inefficient process. Solar panel powers two electrodes, sunk into water. The electricity of the electrodes causes electrolysis, breaking water down into hydrogen (at the anode) and oxygen (at the cathode). The separate hydrogen and oxygen gases are collected. They are then combined to create energy.
You are correct, this can be done, and it is one scenario for creating hydrogen for use in a home environment. Solar panels could create hydrogen through electrolysis. * This scenario makes it clear, however, that hydrogen is not truly a fuel -