Although American Graffiti is set in 1962 Modesto, California, Lucas believed the city had changed too much in 10 years and initially chose San Rafael as the primary shooting location. Filming began on June 26, 1972. However, Lucas soon became frustrated at the time it was taking to fix camera mounts to the cars. A key member of the production had also been arrested for growing marijuana, and, in addition to already running behind the shooting schedule, the San Rafael City Council immediately became concerned about the disruption that filming caused for local businesses and therefore withdrew permission to shoot beyond a second day.

Petaluma, a similarly small town approximately 20 miles north of San Rafael, became more cooperative and American Graffiti moved there without the loss of a single day of shooting. Lucas convinced the San Rafael City Council to allow two further nights of filming for general cruising shots, which he used to evoke as much of the intended location as possible in the finished film. Shooting in Petaluma began on June 28 and proceeded at a quick pace.

In addition to Petaluma, other locations included Mel's Drive-In in San Francisco, Sonoma, Richmond, Novato, and the Buchanan Field Airport in Concord. The freshman hop dance was filmed in the Gus Gymnasium, previously known as the Boys Gym, at Tamalpais High School in Mill Valley.

More Info: en.wikipedia.org