That's the big challenge with both wind and solar.
Some guys at MIT have invented a new type of flow battery they claim has ten times the energy density of regular batteries. In a flow battery, the electrolyte flows through the battery instead of residing in the battery. They envision refueling electric cars by pumping in freshly charged electrolyte (a thick black slurry they call "Cambridge crude") instead of plugging in to a charger.
The uneven output of wind and solar installations might best be put to use charging flow battery electrolyte at or near the installation instead of transporting the power long distances over expensive transmission lines and integrating it into the instantaneous electrical load. The charged electrolyte could then be pumped into vehicles, used to power utility peak load generators, or even used to power a home battery (eliminating the need for the current power grid).
Currently, the best way to store wind power is to use it to pump water from a lower elevation to a higher elevation. The problem is finding a suitable lake that isn't already in use for hydro-power.
Another idea is compressed air. But there again, you need a lot of compressed air storage. It's been proposed to use underground caverns. But, like good lakes, those are where you find them.
Too bad AC power can't be stored directly in some kind of device. That would make wind and solar more compelling.
I was thinking some kind of resonant system. Of course, there is always the option of a rotating mass (momentum). The windmill itself is a rotating mass. Too simple, though.
Storage and conversion losses would have to be very low.
There would be a lot of bucks (probably Obama bucks) if someone one came up with a working prototype.