Rain proof pannier covers help to cover everything up and can offer some psychological resistance to petty theft, a prospective thief has to cut them off or untie them before they can start to go through your things.
Some panniers (i.e. Alkels') can be locked to the rack with small padlocks. Zip ties can also secure things but you will have to cut them off later.
Better to plan in advance not to be in that situation at all. But sometimes during the day you need to stop for groceries, etc. If forced to leave a loaded bike somewhere, lock it in a really visible location and if possible ask someone to watch it for you. Sometimes old people are happy to help that way.
In some countries you can pay someone to watch your gear, or a small store will let you park your bike in the back for a small charge. In some third world countries, i.e. in Africa or South America I've routinely had to pay some to watch a vehicle to keep it from being broken into or stolen.