If we look at how communication works we find that words and phrases have a great influence on attention. They bring into the consciousness of the listener the concepts that are uttered. This is what meaning is the concepts that a word or phrase can steer attention towards. This is what communication is the sharing of attention by two (or more) brains on a sequence of concepts.
So it is not surprising that it is useful to talk to oneself. What we are doing when we self-talk is to steer our consciousness. In recent paper (see citation below), Lupyan and Swingley look at how self-directed speech affects searching. Here is part of their conclusions:
In this work, we examined effects of self-directed speech on performance on a simple visual task. Speaking the name of the object for which one was searching affected performance on the visual search task relative to intermixed trials on which participants read the word but did not actually speak it before or during search. The effect of speaking depended strongly on the characteristics of the target item. Search was improved for the most familiar and prototypical items - those for which speaking the name is hypothesized to evoke the visual representation that best matches the visual characteristics of the target item. Search was unaffected or impaired as the discrepancy between the name and target - measured by measures of familiarity and imagery concordance - was increased.
Facilitation due to speaking also became larger with repeated exposures to the target items. Arguably this occurred because multiple exposures strengthened the associations between the label (e.g., elephant) and the visual exemplar (a given picture of an elephant). The idea that saying a category name activates a more prototypical representation of the category is also supported by the finding that speaking the name actually hurts performance for items with low within-category similarity. One implication is that repeating the word knife may, for example, help an airport baggage screener spot typical knives, but actually make it more difficult to find less prototypical knives.
On our view, the reason speaking the target name affects visual search performance is that speaking its name helps to activate and/or keep active visual (as well as nonvisual) features that are diagnostic of the objects category, facilitating the processing of objects with representations overlapping those activated by the label. This activation of visual features occurs during silent reading as well. Indeed, it is what allows fore-knowledge of the target to guide search. Self-directed speech, as implemented in the present studies, is hypothesized to further enhance this process.
This idea of controlling attention is also shown when people try to keep some piece of information in working memory by repeating it, when they encourage themselves to do something difficult or scaring, when they are learning (or planning) a complex sequence of actions. Searching is not the only activity that benefits from a little talking to yourself.
Lupyan, G., & Swingley, D. (2011). Self-directed speech affects visual search performance The Quarterly Journal of Experimental Psychology, 1-18 DOI: 10.1080/17470218.2011.647039