Drupal is available worldwide and while we code it in English, its textual string outputs get translated to numerous languages. The t() function is mandatory for all text strings that will be read by a user or an admin, as it is the only way Drupal core can re-translate those strings to something legible for the readers.
t() is essential for localization, but also has important security functionality that every Drupal developer should know about and understand. It is much maintenance-friendlier to wrap all user-facing text in t() in the first place than to go back in to t()-ify your code when you or someone else decides they want to use it in another language.
Whenever you use default text values, also wrap them with the t() function. If you don't, these values cannot be translated through the Translate interface functionality. Example:
// Bad practice. The word 'Submit' cannot be translated $button_text = variable_get( 'mymodule_submit_button_text', 'Submit' ); // Good practice. The word 'Submit' get's entered into the translation tables. // Do NOT pass user provided content into t()! $button_text = variable_get( 'mymodule_submit_button_text', t('Submit') );
The full API documentation for t() is the most detailed. Be sure to have a look at that.