Things to consider
* Noise immunity (higher the R, higher the coupled noise voltage)
* Switching speed (higher the R, slower the charge of parasitic C)
* Margin for low level logic threshold (the lower the R, the higher the voltage when transistor is pulling it to GND because transistor has on-state R, say ~50 ohms for an open drain IO pin)
* Power consumption (during low state, I = U/R)
TLDR:
Hundreds of k for battery operated things (careful with noise and speed).
4.7k - 10k general purpose
1k high speed I2C etc. (lower than that and '0' state voltage quickly becomes a problem)