Science, and the technology based on science, are very useful tools in nation-building, since they drive development and increase material prosperity. The world's most advanced economies are based largely on knowledge and skills. Science and technology are essential both to create this knowledge and to provide the infrastructure within which it can be applied. They can provide the nation with good transport networks, healthcare, educational resources, and functioning institutions of all types.
Nation-building happens in a number of contexts both internally and externally. For instance, the United States has been building itself as a nation for over hundreds of years. Other nations, such as South Africa, have been building themselves a new identity over a shorter period, after a cataclysmic change (in this case, the end of the apartheid regime). The type of nation-building that receives the most news coverage, however, is external nation-building, where a country such or an international coalition attempts to build a nation in the wake of a previous regime's collapse. Afghanistan and Iraq are prominent examples.
Science and technology are integral to all these types of nation-building but are more effective in the case of internal nation-building, where there is a shared foundation of values on which to build. A nation requires not only institutions and economic prosperity, but an ethos, and this is something which science and technology cannot replace. Science and technology are excellent tools for developing a nation when a reasonable consensus has been reached about how it is to develop, but they cannot make up for the lack of such a consensus.