Enphase Energy, based in the Bay Area's Fremont, is laying off about 500 workers and pulling manufacturing from Guadalajara.