A term used mostly sarcastically to mock someone for a mistake or doing something stupid, similar to how "genius" can be used.
It comes from the popular series "Star Trek", however as a Starfleet Commander makes little sense as a actual position, so it is usually used as a insult or by genuine Starfleet Commanders.
This also adds to the humor of calling someone a Starfleet Commander as it is a position that sounds fancy, though it does not make any sense.
"Guy 1 - I heard Tyler
got promoted to Starfleet Commander after he slipped and put his foot through the house roof last weekend.
Guy 2 - Yeah, what an idort