Should bad prior work be ignored, or cited and criticised? A high citation rate is desirable in academia.  Citing other work doesn't cost much, so citations are cheap to give but desirable to get.  That brings me to the question:

If a previous article addresses a topic similar to the one I'm writing, is that a sufficient reason to cite it?  Or should the prior article meet a minimum quality to "deserve" a citation?  To put it bluntly: if I'm aware of a prior crappy article, should I ignore it, or cite it and write why it's crap (of course in a more diplomatic way)?

In my field, some articles questioning anthropogenic climate change get quite a lot of citations from colleagues pointing out flaws in their reasoning or statistics...

Note that I'm exclusively talking about peer-reviewed publications.
Negative citations is what you describe. It is something of a fallacy of the system that a paper may get many citations and therefore seems important when it is clearly sub-par and is referenced in a negative connotation.

Seen objectively, one should give credit where it is due. If someone was first to realize something then that is the origin of the idea (in official terms), how good or bad the paper is, is irrelevant. In some cases first discoveries may just be gut feelings and not well-founded. 

I sometimes have to bite my lip when I reference some papers because I really do not think they deserve it (because I know the background) but realize there are no two ways about it. You can of course chose not to reference it, as you have the freedom to chose what we cite, but you may end up getting reviews asking you to add it (if it is something key).

In some cases it is possible to provide objective criticism of a paper. The problem is that the shortcomings will have to be clear.