While the question "is economics a science?" is a little pedantic - the answer is depends on how one defines science - raising it does sometimes lead to some useful reflections on what it is that we actually do.
In an essay for Institute for Advanced Study's Institute Letter, "Economics: Science, Craft or Snake Oil?" Dani Rodrik offers offers a number of characteristically interesting thoughts on the topic, including:
Economics, unlike the natural sciences, rarely yields cut-and-dried results. Economics is really a toolkit with multiple models—each a different, stylized representation of some aspect of reality. The contextual nature of its reasoning means that there are as many conclusions as potential real-world circumstances. All economic propositions are “if-then” statements. One’s skill as an economic analyst depends on the ability to pick and choose the right model for the situation. Accordingly, figuring out which remedy works best in a particular setting is a craft rather than a science.Or, as Keynes said: "Economics is the science of thinking in terms of models joined to the art of choosing models which are relevant to the contemporary world."
One reaction I get when I say this is the following: “how can economics be useful if you have a model for every possible outcome?” Well, the world is complicated, and we understand it by simplifying it. A market behaves differently when there are many sellers than when there are a few. Even when there are a few sellers, the outcomes differ depending on the nature of strategic interactions among them. When we add imperfect information, we get even more possibilities. The best we can do is to understand the structure of behavior in each one of these cases, and then have an empirical method that helps us apply the right model to the particular context we are interested in.
See also related thoughts from Mark Thoma and Chris Dillow.