You can harness solar energy to power a 3v DC motor with relative ease by replacing the battery in traditional power schematics with a solar panel or panel(s) capable of powering said motor.
In fact, of all the applications of solar power, the ability to directly power something like a DC motor is by far one of the easiest experiments to conduct in your own home, able to be accomplished within a few minutes with basic tools and supplies.
Strip 1/8th of an inch of insulation from each of the solar panel's wires, as well as the motor's wires. This might have been done for you already prior to your obtaining the motor and/or solar panel, but ensure you have at least 1/8th of an inch of exposed metal on each wire before proceeding.
Twine the stripped end of the solar panel's positive wire (usually red) with the motors positive wire. Both positive and negative wires are usually denoted by a "+" symbol on the connecting point on the housing of the component itself.
Twine the stripped negative wires (usually black) together, making sure that both connections are secure and that the metals of the wires are firmly touching one another. Without a solid connection between wires, your power source will stutter in its duties.
Place your construction in a source of bright, consistent light with your solar panel facing directly into said light source.