When you give an explicit attack order to something that is auto-targetable, they will auto prioritize units of that type (well, first, units of that type and mark, followed by units of their type). You can see the current preferred target (if any) in the tooltip for that ship. This preference is set on a per ship, though, not a per ship type.
You can clear their current preference by sending a stop order (Bound to the End key by default).
There is already a suggestion somewhere to allow setting these priorities without having to actually target one (and thus finding an enemy one on the same planet) first, and I think there is a another suggestion to allow a way to set these priorities across a ship type (like, for all sniper turrets to prioritize raid engines or fighters to prioritize bombers or whatever), and not just ship by ship (which would have the advantage of the preference survive a rebuild).
EDIT: I was going to post about the complex targeting process and how there are many other factors, and the alternate targeting logic tries to maximize kills per second rather than damage per second, but Hearteater ninja'd me on both points.