The only connection I can think of between the CEL, battery light, and the tail light light is ground. I'd check the engine ground cable making sure the connections are clean and tight. If your engine ground comes off all kinds of strange things happen as currents find their way back to the alternator through any convenient path, like the gauge cluster and tail lights.
If the engine stumbles and almost dies, it makes sense to get the CEL and battery lights, but why did the tail light light go on too?
Asterix