You lose the ability to produce units and use special abilities you've researched if you scuttle military labs, so in general you never scuttle military labs. However, you get to keep most civic techs, the only things you lose are the ability to produce structures that you no longer have the technology for. As a result, it's very common to do the opposite, scuttling civic labs to make room for more military ones (if you don't have room for labs, you definitely don't have enough room for trade or refineries anyways)
In general this is something you do only early game. Research volcanic and/or ice colonization technologies and whatever else you want, then scuttle the labs and replace them with military. After doing this its entirely feasible to ignore the civic tech tree for the first hour of the game. Once it hits late game and you start to build up, however, you should never scuttle your labs; this is something you do early game when you simply don't have enough logistics slots to get by.