Sorry for the delay.
The two most obvious causes for your fault are damage to the microswitch which senses when the cover is closed and water ingress into the camera. The first possibility is often caused by the second one as any moisture getting into the switch can cause corrosion, but it can also "just happen".
From your answer, the camera would appear to be around two years old; the waterproofing seals and packing distort and harden with age so must be replaced annually. I don't know whether the camera has been used in seawater or pool water, but after use the camera must be submerged in a bucket of fresh water for about ten minutes. This flushes out traces of salt or pool chlorine; salt water dries out to leave salt crystals which distort the seals and may even physically damage them, pool water contains chlorine (sometimes ozone) which chemically attacks the seals. Either way, a damaged seal allows some water into the camera and it only takes a minute amount to damage it. Some people (myself included) find that carrying a bucket of fresh water to the beach just isn't practical and so rinse the camera off under a tap (US=faucet) or beach shower. This is not a good idea and every underwater camera which I use for snorkelling specifically forbids it. Page 65 of
your camera manual also warns against it. The problem is that the force of the water falling directly onto a seal is enough to overcome it. Underwater, the pressure is steady and the whole camera is experiencing the same forces, but a modest gravity flow from a tap or water bottle puts uneven pressures on the seal and can unseat it just enough to allow a little water inside. Although I do break the rules, I normally protect the camera by thoroughly wrapping it in a t-shirt or even by slipping it into my shorts/wetsuit so that there's no direct flow of water onto the camera surface.
The other possible cause of water ingress is if the camera cover was closed without checking for sand or debris on the aperture or if the camera has ever been dropped. I know it's a tough shock-resistant camera, but the seals don't always survive rough handling. If the camera door has been opened before the camera is fully dry or if it's done when you have wet hands then it's also possible for a drop of water to get inside, and that's all it takes for the switch or some other component to corrode. The problem is worse if the camera has been stored between wet use with the doors closed and the memory card and battery in place: this camera is best stored open and empty.
Unlike most modern compact cameras, yours is designed to allow regular servicing even if it's only to replace the seals. I recommend that you contact your nearest Olympus Service Centre for an estimate. They can only give you the price of the re-waterproofing work, but you can stipulate that they try to fix the door fault first as the rest of the job is pointless if that cannot be fixed or proves to be too expensive to repair.
For servicing and repair,
click here if you're in the USA and
here if you're in the UK or Ireland. If
anywhere else, then click here instead and navigate to your local page.
If you decide not to go ahead with the repairs and maintenance, then as a specialist model your camera will still have some value if you sell it online as a "spares or repairs" model.
Sorry that there is no quick fix option in this case, but I hope that my reply has explained what has probably happened and why and that it helps you to avoid repeating any mistakes which you may have inadvertently made. There is a very good chance that your camera can be fixed by Olympus; the repairs are unlikely to be cheap, but they're still far cheaper than buying another camera with equivalent underwater performance. The current Olympus Tough range descended from models like yours but are not as well made which explains why you'll see very few 720SW and 1030SW's on sites like eBay in any condition. Those which do appear sell very quickly and for good money, even when broken.
If you have any further questions about what I've written or if you think I've missed something, then please let me know via a comment. Otherwise, please take a moment to rate my answer.