I am from Saudi Arabia travelling to the USA with a valid visa. Can I stay overnight in London? Do I have to take my checked luggage or can it be left at the airport for the next days flight?
The duplicate target suggested in comments should give you the answer you need for the visa part.
As for not collecting your checked baggage, you will need to ask the airline if they will agree to check your baggage through to the US destination even across an overnight layover in London. Usually airlines don't do that, but there might be a chance if it's a tight late-night-to-early-morning connection. Call the airline and ask them. Or ask nicely when you check in and be prepared for either outcome.