If you keep reserching industral theroy and xeno econmics and other planet based techs you will find that you are almost always building or upgrageing something on your planets.
However, if you get in a situation were several of your planets are not building and you want to keep the social spending up for your empire. (To keep the other planets building stuff) you can then go to the top of the planet screen and "Focuse" the spending of the individual planet on either reserch or military. Then the plnet in question will take a % of the social spending being alocated buy the empire and put it into the focused area.
If you have no planets building anything you can turn socail spending all the way down in the domestic policy window and spend everything on military or reserch.