How do I alter the text of the input field in the search form?
@NoSssweat has provided a link, it is the answer if you want to alter a placeholder.

But reading your question I am getting other indications also.

FOR D7:

Case-1: If I read the sentence from your question "I need to alter the text of the search input field" I think you are talking about the placeholder, Now what is placeholder- you can see in following image the word "Search the site" in the text-area is called place-holder.



Case-2: But if I read your last sentence, "Is $form['search_block_form']['#title'] = ''; the right thing to do here?" then it talks about other things, this is corrosponds to Text appear when you hover on the input text-area("Enter the terms you wish to search for") as shown in following image.



I will explain both of that, The best tutorial for this is available here: How to Customize the Block Search Form.

Case-1 Paste the following code in your theme's template.php file, change the YourThemeName with your actual theme-name, save &amp; clear the cache.

function YourThemeName_form_search_block_form_alter(&amp;$form, &amp;$form_state, $form_id) {
    $form['search_block_form']['#attributes']['placeholder'] = t('Search the site');
}


Case-2

function YourThemeName_form_search_block_form_alter(&amp;$form, &amp;$form_state, $form_id) {
    $form['search_block_form']['#attributes']['title'] = t('Place a new sentence');
}




Case-3: If you want title on the block, you can just go to block configuration and put the title whatever you want, it will appear as a title of the Block.

 

FOR D8: as @NoSssweat pointed out in the following comment, how to do in D8. Hence, I am just repeating that comment here as it is needed.

function YourThemeNAme_form_search_block_form_alter(&amp;$form, FormStateInterface $form_state) {
  $form['keys']['#attributes']['placeholder'] = t('The new placeholder');
}