Is a URL with a query string better or worse for SEO then one without one?

Search engines can read query strings just fine so both are acceptable to use.

The first example you use does offer more benefits for SEO since it clearly creates a hierarchy with broader categories to the left and more specific categories to the right. It's also good for usability since it is easier for humans to read and remember.

But overall this won't have a large impact in your rankings.

@John Conde is right. The first URL has a hierarchy, which Google prefers.

Have a look at this Google Search Engine Optimization Start Guide (PDF link) Pages 8-11 specifically