Space exploration has a few effects on the economy. Some of them are good and some bad.
On the bad side, space exploration costs a lot of money. This is money that is taken from taxpayers. It is money that could be used for other things that would be more useful to people in their everyday lives than things like putting a man on the moon.
On the good side, there are a couple of ways in which space exploration is beneficial. First, it gives people jobs. The money is spent buying things from companies or paying employees of NASA and other agencies. Second, and perhaps more importantly, space exploration can lead to the development of new technologies. As companies and governmental agencies try to find ways to make space exploration possible, they can develop new technologies that might be helpful in the civilian economy later on.