You would want to use the Geocoding API: http://code.google.com/apis/maps/documentation/geocoding/
This could be as simple as capturing the output of http://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&sensor=false
with file_get_contents, and then using json_decode on the result to get a multi-dimensional array. If you put the url above into your browser you'll see the json response returned.
<?php
$json = file_get_content('http://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&sensor=false');
$array = json_decode($json);
echo $array['results']['geometry']['location']['lat'].PHP_EOL;
echo $array['results']['geometry']['location']['lng'].PHP_EOL;
However if you read through the api docs, there is a 2500 request limit per day.
I see three ways you could implement the automation of this.
First, you could have a single cron script that just pulls all locations with a limit of 2500 and then processes those every night.
Second, you could actually do the request when the user submits an address initially. The issues with the second option would be the time it takes to complete the external request as the user would need to wait for that to happen before the record would be saved.
Third, you could use a queue, where when the user adds an address, instead of doing the request directly, it is added to a queue to be picked up later, and on a timed cycle, a cron script picks up only the items in queue and processes them.
Queueing is a great way to offset these kinds of tasks like sending emails, geocoding and other background tasks and there are lots of ways to handle queues.