Calculation of resistor values which control LEDs through transistors and have pull-up / pull-down resistors attached
The key is to choose those resistor values so that the transistors operate in the saturation region ( as a switch).

From what I see in the schematic you provided each transistor is driving 4 LEDs, and you want the current through each LED to be 22 mA. Then the collector current through each transistor when driving its set of LEDs is 4x22mA=88mA.

With that information, you can figure out how to overdrive the base current so that the transistor are in saturation. That is, choose a \$\beta_{forced}\$ &lt; \$\beta(min)\$ of your transistor. That will ensure the devices are in saturation.

Say, you pick \$\beta_{forced}\$  = \$\dfrac{\beta(min)}{5}\$ or for simplicity select it to be \$\beta_{forced}=10\$ as you have in your specs. 

Then \$I_B=\dfrac{I_c}{\beta_{forced}}=\dfrac{88\text{mA}}{10}=8.8\text{mA}\$

You can now find the values for the base resistor using kirchoff's law

$$ R_B=\dfrac{V_{output}-V_{BE}}{I_B}$$

where \$V_{output}\$ is the voltage at the GPIO when high

You device worked because your values for \$R_B\$ provided enough overdrive current through the base to put the transistor in the saturation region.

For R2 you had 510 ohms, so 

$$ I_B=\dfrac{5\text{v}-0.82\text{v}}{510\Omega}=8.20\text{mA}$$ assuming the gpio is 5V when high (\$\beta_{forced} \approx 10\$). Even if it were 3.3V, \$I_B=4.9\text{mA}\$ and (\$\beta_{forced} \approx 18\$), those currents are high enough to drive the transistor into saturation.

Also, if you check the datasheet, for a saturation voltage \$V_{ce}=0.3\text{V}\$, they were trying a base current of 15mA for a collector current of 150mA (\$\beta_{forced}=10\$). 

EDIT: 
One of the comments added the fact the typical I/O pins have an output impedance of about 100 Ohms. This changes the base current a bit, but still keeps the device operating as a switch (\$\beta_{forced}\$ is still a fraction of \$\beta(\text{min}\$)). 

From what I see in the datasheet for the ESP8266, you can configure your GPIOs as open drain, push-pull, etc. I don't know which of those settings you are using. But if you are using them as push-pull (can drive the output high or low) all the above is still valid after startup. 

Now, I am guessing at start-up those GPIOs are high-impedance and you want a well defined status, that's why you're pulling down and pulling up the two GPIOs you mentioned. At start-up, your green LED, which is connected to the GPIO2 (pulled high) should light up not as bright as after start up (but you won't even notice), this is because the base current isn't as big to set a collector current of 88 mA. The base current should be about (leakage current into the gpio should be negligible):

$$ I_{B(@startup)} =\dfrac{V_{cc}-V_{BE}}{R_{pullup}+R_B}=0.236\text{mA}$$

If we say \$\beta\$=100, then the device is probably not a switch at this instant (is in the active region), \$I_C=\beta I_B\$=23.6mA (\$V_{ce}\approx 3\text{V}\$, and so it is indeed in the active region), which you have to divide by four (since you have four LEDs), so each LED will have \$I_F\approx\$5.9mA. That's why the LEDs won't be as bright as when you are getting 22mA through each one of them. But this only happens at startup, which is probably unnoticeable. 

The issue that I can see is that at startup, GPIO2 may not be high enough due to the base current being sufficiently high to generate a considerable voltage drop across the pullup. That is, 

$$v_{CC}-I_{B(@startup)}R_{pullup}=V_{gpio2}=0.94\text{V}$$

And the ESP8266 will read a logic high if it is at least 0.75*Vcc=2.48V as per the datasheet.

You don't have this issue with the pulldown. 

I don't know what the central block of your schematic is, I've assumed those transistors connect directly to the GPIOs.

Ideally you may want to isolate your transistor connected to gpio2 from this output, say for a couple milliseconds, that way the base current won't put that gpio in an unknown state at startup (maybe add some kind of delay mechanism?). After startup, you could 're-connect' you transistor associated with gpio2, and all the above calculations for \$R_B\$ still apply (push-pull config).

After startup, the pulldown, looks like a load to GPIO15 when driven high, it doesn't affect your base resistor calculation, but you don't want to draw more current from that pin than the max rating (right now it is about .33mA being drawn from the pulldown (3.3V/10k)). The total current pulled from that gpio is going to be the base current plus the current through the pulldown resistor. But I don't see this as an issue as long as you are under the max rating.

I hope this is helpful and hope other people add to this some ways of addressing something like this.