There is no difference in intent. By that I mean that that the speaker (or writer) would intend to convey the same meaning no matter which one they chose. There may be some difference in comprehension, though.
Translate this to the UK, where "Each bag is 18 pounds" would be ambiguous. The copula "is" is being used there, but you don't know whether "pounds" means currency or mass. There's no such ambiguity with "dollars" so we can fill in the blanks and realize that it means "Each bag costs <X>". In general, if time and inclination allow, I think we should make the effort to be clear, and not depend on the deductive powers of the audience. For that reason I'd tend to stick with the "Each bag costs 18 dollars" option or, more generally, "Each has a <property_name> of <property_value>". "Each bag has a price of 18 dollars; each bag has a weight of 18 kilograms". Note that "price" is actually more correct in this context than cost (which was the price the retailer or wholesaler paid for it).