The legs assist the bench press, so if you’re not using your legs when you’re benching, you’re missing out on a key component of the lift.
For starters, the legs provide lateral stability in the bench press. Remember, the bench itself is relatively narrow, so your stance contributes heavily to your lateral (i.e., side-to-side) stability, and more stability is always a good thing in any lift. Using a roughly squat-width stance will work when learning to bench, and some may gravitate toward a slightly wider stance over time.
Next, be sure to drive “up the bench” with your legs when you bench. To see what is meant by “up the bench,” lay down on the bench without the bar in your hands and drive your feet into the floor so that you slide on the bench in the direction of your head (i.e., away from your feet). In reality, of course, we don’t want to slide on the bench when performing the lift, but this won’t be a problem because your shoulders will be pinned to the bench by a heavy barbell. Note that driving “up the bench” is not the same as driving “up OFF the bench” - the hips need to stay in contact with the bench throughout the rep, so keep your butt on the bench.
Be sure to drive with your legs throughout the entire lift - drive during the descent as well as the ascent. Don’t wait until you’re pushing the bar up to start driving with your legs. Driving with your legs helps support your arch when benching, and it also makes you a tighter, more rigid lifter - more “compressed.” In a squat, deadlift, or press, your lifting shoes provide a rigid, non-compressible interface between what’s moving the bar (you) and the support surface (the ground), but in the bench press, your body is the interface between what’s moving the bar (your arms) and the support surface (the bench), so getting as tight and rigid as possible makes for a more efficient bench press, and driving with your legs facilitates this.
With all this in mind, don’t forget about your legs the next time you bench. They might just be the missing ingredient for your next PR.