Your free body diagram holds only for $t=0$.
Observe that at $t=0$, due to the force $ma$, there exists a torque on the bob, $\tau=ma\ell$ where $\ell$ is the length of the string. This causes the bob to rotate. If $ma$$a$ is directed to the left for the elevator, the inertial pseudo-force on the bob will be directed to the right, causing the bob to swing anticlockwise.
As long as $ma$ isn't too great, the bob will tend to reach an equilibrium, namely where the torque becomes zero. Let $\theta$ be measured from the vertical. Then the torque becomes zero precisely when: $$mg\ell\sin{\theta}=ma\ell\cos{\theta}$$ Which can be shown with geometry. This reduces to: $$\theta=\arctan{\frac{a}{g}}$$ Intuitively, observe that this makes sense. The larger the lateral acceleration, the larger we can expect the angle of deflection to be.
Since at this point, the bob is in equilibrium, the tension in the string must be equal to the magnitude of the vector sum of weight and lateral force. In other words: $$T=m\sqrt{a^2+g^2}$$ We use the Pythagorean theorem since the lateral force and weight are always orthogonal.
For the second part, as far as I know, since the velocity is constant, $T=mg$. There are no torques at play here. The problem is entirely one-dimensional.
Please comment if anything seems off!