There are roles better suited to small ships (stealth, being maintained with few maintenance facilities, cheap shipyards), and there are roles better suited to large ships (mainly in combat efficiency; due to various factors, one 32,000 ton ship should have a considerable edge over 4 8,000 ton ships).
There are further disadvantages to very small or very large designs. Generally, I don't build standalone warships smaller than about 6,000, because engines get a very large efficiency boost by being 2,500 tons. So my destroyers or frigates are often built around a single 2,500 ton engine, which tends to put them in the 6,000-8,000 ton range. Very large designs also have problems; bigger shipyards, more maintenance facilities, and costlier jump drives (since they scale geometrically in both research and construction cost as they get larger). You also don't want all your tonnage in one ship, because it's much more efficient to have one jump warship and 3+ non-jump warships in the same group, and because you will likely want to be able to split up your fleet.
However, something interesting about very large designs: The inefficiencies are based on the largest ship in your fleet, not the average size. If you have a 100,000 ton dreadnought and 20,000 ton cruisers, then you still need a shipyard and maintenance facilities for a 100,000 ton ship, a jump drive that can jump the dreadnought, get detected by resolution 2000 sensors, etc. Hence why I've come around to the idea that while there's no ideal ship size, it's a bad idea to have different ship sizes. Basically, if your largest warship is going to be 20,000 tons, you want every other warship (at least in that task group) to also be 20,000 tons. Even if some of them are AMM escorts, or carriers, or whatever, it makes the most sense for them all to be 20,000 tons. This also has advantages with the jump drive system.
So, IMHO, your ideal warship size is going to be based on your industrial power and research ability, basically whatever ship you can produce in large enough quantity to adequately cover your empire, and then you want almost all of your ships to be that exact tonnage.
There is some value in having some warships of a much smaller size, that can function as scouts or guards for colonies with only a few maintenance facilities. But even then it basically works out to two sizes; a minimum size (for me, 6-8kt) and a large size (the biggest that makes economic sense).