R=V/I
You know the voltage across the resistor and you know the current that is required to drive the load that is connected to the pull-up or pull-down resistor.
Example:
Your supply voltage is 5V.
You use a pull-up to drive a line high.
One input is connected to this line, the impedancce of the input is 10kΩ.
A minimum logic level of 3.5V shall be required for the input to recognize a logic high signal.
From these parameters we get:
- max. voltage drop acrosss the resistor: Vr=5V-3.5V=1.5V
- input current into input: Iin= 3.5V/10kΩ (since 1.5V drop across the resistor, the remaining 3.5V are on the input)
- Rpull-up= Vr/Iin=1.5V/(3.5V/10kΩ)=0,428*10kΩ=4.28kΩ
Choose the next lower standard value, e.g. 4.22kΩ
Edit: For safe operation including worst case conditions one would typically use a much lower resistance, e.g. .2.2kΩ. Also to be taken into consideration is the load capacitance (capacitance of the wiring and the input) and required rise time of the signal: The capacitance and the pull-up resistor build a low pass with a time constant of t=R*C. The faster the signal is (short rise time), the smaller R needs to be (given that you cannot easily change the capacitance).