The charged bob experiences two forces at equilibrium:
Gravitational force: Fg=mg (downward)
Electric force: FE=qE (horizontal, in direction of field)
These forces are perpendicular to each other. The string tension must balance their resultant.
At equilibrium, the string makes angle θ with vertical such that:
Vertical: Tcosθ=mg
Horizontal: Tsinθ=qE
The net force from gravity and electric field is (mg)2+(qE)2
Therefore, the tension in the string is: T=m2g2+q2E2