Our body offers an estimated resistance of 300-1000 Ohms. It can act as a closed path for flowing current.
When a person touches both wires, current flows through one end of the wire, enter the body and exits through other end of the wire. This current is very less. A transistor is used which amplify the current and glow the LED.
When the wires are not touched, the circuit is not closed and thus no current flows through the circuit.