This paper proposes a comprehensive framework for prescribed-time optimal switching and control (PTOSC) in switched systems. First, a new performance index function is defined, which considers the system state, specified time and accuracy, and control costs. This effectively incorporates the prescribed time control into the optimal control framework. Following this, a switched Hamilton-Jacobi-Bellman equation is derived. An event-triggered (ET) PTOSC algorithm, via reinforcement learning, is subsequently presented to solve this equation, and then the optimal control policies are derived. At each event-triggering instant, the switched controller determines which subsystem to activate, and the input controller updates the system inputs. The proposed PTOSC algorithm guarantees the stability of the switched systems and ensures the system states converge to a specified range within a specified time, all while minimizing energy consumption. Furthermore, the devised ET mechanism significantly reduces the communication burden and effectively avoids Zeno behavior. Finally, a simulation is performed to validate the proposed PTOSC algorithms' effectiveness.