It depends on which valley you're talking about, but most were created by erosion. Either that or they're the space between two hills/mountains.
In the Valley was created in 1890.
In a Valley by the Sea was created on 2007-10-04.
The Valley of the Lost was created in 2002.
Valley of the Shadows was created in 1993.
Sacramento Valley Museum was created in 1963.
Spring Valley Academy was created in 1968.
Wye Valley was created in 1971.
Valley Cougars was created in 2001.
Smoky Valley was created in 1954.
Heroes of the Valley was created in 2009.
High Valley was created in 1997.
The Hanging Valley was created in 1989.