Some creatures are given the traits "Small -X" or "Large +X" (Page 85 of the revised book, not sure about the first printing), which affects DMs for ranged attacks.
You get a bonus to hit a vehicle based on its size (Page 140) when attacking as infantry or from another vehicle.
Spacecraft vs vehicles (or infantry) also have hit modifiers - but the damage scale is also different (Page 167).
Also, vehicle weapons have a much longer range than infantry weapons, and spacecraft weapons operate on another scale altogether; if the spacecraft uses that range advantage then your chance to hit it from a vehicle will generally be zero.
The relative size of spacecraft generally doesn't matter because of the distances/scale involved. Some specific capital-grade starship weapons (covered in High Guard) do take penalties to hit small targets, but that doesn't affect the rest of a ship's arsenal.