For better search results or due to integration with Adsense you many want to replace wordpress search with Google Custom Search (CSE)
Below are the steps to follow using a simple wordpress plugin. [Download Plugin]
1. Register you site on Google Custom Search by filling a simple form as shown below
2. After creating your CSE you will get a search engine ID as shown below. Make a note of this ID.
3. Create a page to display the search results page and add [PW_ADD_GSEARCH_RESULTS] shortcode on this page.
4. Add the the URL of the search results page on the setting screen of the plugin.
5. Comment/Remove the code in searchform.php in your themes folder of probably header.php and add below code instead
This will create the search box.