Afaik they are pretty straightforward and most if not all are based on personal preference/gameplay.
I tend to use light-starships to support sniper-like ships (they are weak and when on the front you'll just keep replacing them)
Higher mk's star-ships rock on offense.
Raid-ships -> when you need to raid ... (I tend to have them, but only use them when I cant send out a group of bombers
asap)
Bomber -> when you are facing big foes you want to get rid of fast (I tend to have them on my 'wave-planet' to take down any supporting star-ships fast).
Siege -> same as above, I tend to keep them at my 'wave-planet' to do some extra long-range damage and keep them in reserve for whenever I want to hit something from a distance (and dont have sentinal frigates to do that job)
Leech -> support your fleet, if they dont convert/capture they at least dont hurt and they dont seem to be targeted that quickly by the AI
Scout -> well, they are there if you would want to use them
Cloaker -> Similair job as scout-starships, but better at it.
Than you also have that ship that can build fleet-ship, but I just cant find any reason to 'unlock' those (if you "need" one you can build a merc one just as well, resources are unlimited, knowledge isnt).
Riot -> Have used it a couple of times, but I favour the starship line of ships and take that route. (The choice is basicly do you want to strengthen your fleet by adding more 'anti fleet ship'-firepower(riot-line), or do you want to boost the 'allround-ness' your fleet already has(starship-line).)
What and how much you need to build depends on your playingstyle and needs. I hardly ever "need" siege-starships, but they are convinient and balance out some resource-usage. I dont need raid-starships, but having them at hand means you can hit just 1 more target where you otherwise might run out bombers/need them somewhere else, etc. Having some scout-starships at hand might mean you could save that beaten down starship from destruction, cloaker the same, leech can get you some usefull ships/free of charge reinforcements, bomber-starship can leave your bombers free to bomb other targets, etc etc ... but you'll hardly ever really need any of them.
Starships are there to augment your already existing fleet, just read their ingame description and give them a try.
(I'm afraid I'm repeating myself within the same post, but I hope it is clear ... you never ever really
need any of them
)