Q:

Why were two different California airbases (Vandenberg and Edwards) intended for Shuttle launches versus landings?

Vandenberg Air Force Base was intended to be the west-coast launch site of the Space Shuttle.  Its Space Launch Complex 6 was only a few months from being ready for the first launch, when the Challenger disaster occurred, leading to its cancellation as a Shuttle launch site.
Edwards Air Force Base was used many times as a Shuttle landing site.  It was also the location of the test flights of the Enterprise shuttle.
Why have two separate sites for launch and landing, instead of consolidating them at one site, as was done at Kennedy Space Center?

Clarification: The question is about Vandenberg versus Edwards as two sites.  It is not at all about west coast versus east coast.

A:

Why have two separate sites for launch and landing, instead of consolidating them at one site?

The plan was to have one site for both launch and landing. The Challenger disaster resulted in a change of plans.
Edwards AFB was one of the test locations of the Shuttle program. The test flights with the prototype Enterprise were performed here. But since Edwards is land-locked, there is no safe direction to launch to and thus Edwards does not have launch facilities.
Rockwell's Shuttle assembly plant (Plant 42) was located at Edwards and that plant was initially used for orbiter processing. However, to reach the high flight frequency originally envisioned, the goal was to do most of the orbiter processing at Vandenberg and Kennedy.
Vandenberg AFB is located on the West coast, which makes it a suitable launch location for retrograde target orbits (launch over water for safety). It was intended to have all the facilities for both launch and landing: launch complex 6 was being modified for STS launches, and the runway at Vandenberg was extended to 4580 meters to facilitate the Shuttle landing at the end of the mission.
However, Challenger was lost while the modifications of Vandenberg launch complex 6 were still in progress, and in the wake of this event it was decided to consolidate all Shuttle activities at Kennedy Space Center. In 2002 it was also decided to no longer use Plant 42 for orbiter processing and instead do that also at Kennedy to save the time and costs of moving the orbiter between Kennedy and Edwards.

A:

Edwards already existed, so using that for landing saves you the cost of constructing something else.
Moving the shuttle back to Florida after landing cost a lot of money and time.  With sufficient flight rate, you recoup the cost of a closer landing facility.  History of the Shuttle Landing Facility states

Landing the orbiter at KSC’s Shuttle Landing Facility instead of at
  Edwards Air Force Base saves at least an estimated three-quarter
  million dollars and about five days of processing time for its next
  mission.

Those are big numbers to justify building something close to Kennedy.
For west coast launches, I couldn't find similar figures, but both time and expense must have been much smaller.  You'd still fly it back, but could do it in one hop in an afternoon.   If the flight rate goes up and you're flying 12 shuttles a year from Vandenberg, you'd probably reexamine if building a closer landing facility would be worth it.
Further, with facilities on both coasts, you significantly increase the opportunities for landing with both opportunities and dissimilar weather.  A landing facility 250km away doesn't create a similar enhancement.
Finally, the launch facility needs to be pretty close to the coast, but the California coast can get persistent fog.  The benefit of the facility is decreased if it's too foggy to land regularly.
Space Archive on Vandenberg weather.

The probability of overnight coastal cloud cover during the summer
  varies from about 60 to 70% depending on the location, with Vandenberg
  AFB falling in the middle of this range

