Layer 2 switching provides fast and efficient data transfer within local area networks (LANs) by using MAC addresses to forward frames only to the intended device. This minimizes unnecessary traffic and collisions, ensuring smooth communication between devices and optimal network performance.