Looking for a formula or model for planetary equilibrium temperature which takes into account the greenhouse effect For a project I'm working on, I have made a bunch of hypothetical random planets orbiting random stars. I have come across the Stefan–Boltzmann law, which works nicely for any planet without an atmosphere, but even for Earth, it is off by about 30c due to the greenhouse effect.
I've seen tons of papers model the greenhouse effect on Earth but no generalised expression which could approximate surface temperature on other planets.
 A: You are basically trying to model the effect of radiative forcing on the surface temperature of the planet.
The simplest solution would be to use the Idealized Greenhouse model.
It assumes, that the top of the atmosphere has a temperature $T_{a}$, the bottom (or planetary surface) has another temperature $T_{s}$, and the solar constant is $S_{0}$. The greenhouse effect is modelled using the wavelength-dependent absorptivity (=emissivity) of the atmosphere $\epsilon$, the albedo $\alpha$ (the fraction of incoming radiation that is immediately reflected), and the requirement that all radiation that reaches the planet must eventually be radiated back.
Basically, we assume that the high frequency (shortwave) sunlight that falls on the Earth is transmitted to the Earth unimpeded by the atmosphere($\epsilon_{\text{sw}} = 0$). It is then absorbed by the Earth and re-emitted as low frequency (long wave) infrared radiation. A fraction of this infrared radiation is absorbed by the atmosphere ( $\epsilon_{\text{lw}} = \epsilon \neq 0$) thus modelling the greenhouse effect. Thus, to ensure that the incoming and outgoing radiative fluxes are equal, the surface needs to have a higher temperature than the top of the atmosphere.

The final relations obtained are:
$$T_{a} = \frac{T_{s}}{2^{1/4}} = \frac{T_{s}}{1.189} $$
$$T_{s} = \Bigl( \frac{S_{0} (1- \alpha)}{4 \sigma (1 - \frac{\epsilon}{2} ) } \Bigr)^{1/4}$$
In terms of the effective emission temperature $T_{e}$
$$T_{s} = T_{e} \Bigl( \frac{1}{1-\frac{\epsilon}{2}} \Bigr)^{1/4}$$

For current typical values of the parameters (for the Earth), the model gives, $T_{s} = 288.3 \ \text{K}$ as opposed to the true value of $287.2 \ \text{K}$, so it should be accurate enough for your purpose. Simply input the desired parameters for the planets into the model.
If you want to look into this modelling the effect in greater detail Modeling the radiation field in the Greenhouse effect – history and evolution, seems like a good place to start.
