It is legal to fuel a plane with passengers on board. The airlines and aerodrome operating companies will determine the safety measures that will need to be put in place to allow this to happen. See also CAP 789 Requirements and Guidance Material for Operators.