STOCKHOLM—Three European scientists were awarded the Nobel Prize in chemistry for finding ways to energize and steer molecules, a breakthrough that could eventually transform the treatment of illness and lead to the development of more powerful computers.

The three laureates discovered how to use molecules as components of tiny machines that can be controlled to perform specific tasks.

Scientists...