Space exploration, is it worth the money?

Some say we should fix problems on Earth first. Others say space research pays back in technology and knowledge. What do you think?