How does a non contact voltage tester pen detect voltages and/or currents? Are they limited to voltages of a certain range or type (AC or DC)?
They rely on capacitive coupling which limits them to AC and they are generally designed for mains voltages. Your body being a large object has some capacitance to ground. This makes a (very weak) circuit from the item with AC voltage on it, through the tester, through your body and through the capacitance to ground.
I also noticed that while the detector can detect the 5V of a phone charger cable, it cannot detect the voltage in a USB keyboard cable. The only difference between these two scenarios is the current level and perhaps some minor signaling differences.
In order to supppress electromagnetic interference from switched mode power supplies capacitance must be placed between the input and output sides.
In a class 1 (Earthed) power supply the earth is used as a barrier between input and output either by connecting the output to mains earth or by splitting the capacitance into two parts in series, a part between output and mains earth and a part between mains earth and mains live/neutral.
In a class 2 (non-earthed) power supply the mains earth is not available and so can't be used as a barrier. The result is that the output is often at a significant voltage relative to earth (half the mains voltage is common). This should not be a safety hazard if the power supply is properly designed as the capacitors have a high impedance (low capacitance) and hence the "touch current" is low despite the high open circuit voltage. The capacitors will be special safety types so that short circuit failure of the capacitors is extremely unlikely.
As a general rule PC power supplies are class 1 while smartphone power bricks are class 2. This is why your tester lit up on the cable for charging your phone but not on the cable for your keyboard.
A final question: In what voltage/current scenario would you have to use a current clamp sensor and not a non contact voltage detector for merely detecting the presence of power non-intrusively?
There is no surefire way to detect electricty non-intrusively. Especially when dealing with multicore cables rather than individual wires.