DArvin raises some good points, but I do things a little differently.
First I always get the logistics upgrade in the very beginning right after I start building my first two labs. My reasoning behind this is with the 8 extra slots I can build 2 extra buildings right away, instead of waiting for my roid to be colonized and then its infrastructure and logistics upgraded, and I wont have to scuttle my cap ship factory right away for space if Im rushed (which could hurt me later If I survive the rush). In a MP situation you can usually tell if you need to go military or econ right off the bat with a quick zoomout and checking the placement of yourself in relation to your allies. In a SP situation it'll require some scouting. Send your scouts out along the outer most path they can (in relation to where the star is) and keep you eye out for enemy scouts and frigates. 90% of the time your enemy will be along this path, the other 10% theyll be 1 jump inward (but youll no doubt spot a scout in this case). After locating your nearest enemies, take a look at what you have around you, how many jumps their are to your nearest enemy, and what kind of militia forces are between you and your foe.
If you have a good amount of neutral extractors, a desert/terran or 2, and/or a couple of non-dead asteroids, its safe to go full military if necessary. The extractors/desert/terran/roids will be able to sustain your military needs for a little while, so build 2 military labs, upgrade logistics and build a 3rd. This will give you access to any tech you need to handle an enemy advance. During their constuction it would be wise to send your scout back to your nearest enemies HW to take a look at what theyre building. Against a comp, most likely it will build light frigates, which you answer with a fleet of lrfs. In MP your likely to see lrfs coming out first (which I always answer with bombers, flak are currently too effective against fighters, plus bombers spell trouble for low level caps).
If you have a good distance between you and your foe, then its safe to go econ right off the bat. Build two civics labs and upgrade logistics. If you're TEC you wont need a third for some time, Advent- build a 3rd, Vasari- build a 3rd and place a fourth at your roid (leave the last spot open on your HW for a trade port.) This will give you early acces to the trade port tech for any race and you can research it first, and start putting up trade ports relatively quick to get your high powered econ started. I always upgrade my roid logistics for extra space for tradeports in this situation. As TEC you can get 3 ports at your roid and two at your HW by the time youve cleared a 3rd planet for expansion, at which you can start your military or continue with your econ. You can build your econ up until you're attacked (just be sure you have some military labs so you can get military on the quick) at which point your superior economy will allow you to quickly match and beat your opponents forces.
The tricky part is when you're close to an enemy but only have Ice/volcanic planets in your immediate area. You'll need enough labs to build lrfs and two civics labs to research the colonizing tech. Build your military labs first (purchasing the logisitcs upgrade afterwards) and then build your civics labs. If you need to build the second civics lab at your roid (for advent). Build a few lrfs to assist your cap ship with the ice/volc militia (2-4 should be plenty) and then research your repair platform tech and the proper colonization tech. Build a repair platform at the closest planet to your enemy (could be any of the three you currently control) which will allow you to stave off any advance the comp might make at this point. If you do encounter an early attack at this point, pump out lrfs until the comp decides to retreat and you're good to go.
Something I should mention, because I see a lot of SP players make this mistake when they first join MP, upgrade infrastructure on your colonized planet IMMEDIATELY, 1 upgrade for roids, 2 for all others, otherwise the planet will continue to take money from you. Thehjn point of taking planets is for their economic benefit. You wont be getting that benefit unless you upgrade your planets infrastructure..
Good luck