We present a general solution of the coupled Einstein-Maxwell field equations (without the source charges and currents) in three spacetime dimensions. We also admit any value of the cosmological constant. The whole family of such $Lambda$-electrovacuum local solutions splits into two distinct subclasses, namely the non-expanding Kundt class and the expanding Robinson-Trautman class. While the Kundt class only admits electromagnetic fields which are aligned along the geometrically privileged null congruence, the Robinson-Trautman class admits both aligned and also more complex non-aligned Maxwell fields. We derive all the metric and Maxwell field components, together with explicit constraints imposed by the field equations. We also identify the most important special spacetimes of this type, namely the coupled gravitational-electromagnetic waves and charged black holes.