has many causes, but without more information, it is difficult to pinpoint the exact cause. I would recommend that you see your primary care doctor
if this continues as this could represent a serious injury
To answer your question: YES. Sandals can certainly cause foot pain. The mechanisms by which it causes foot pain vary. One common way is actual through irritation of the skin. As you know, some sandals are far less secure on the foot (like flip flops). These move with every step and can slowly cause rashes and abrasions of the skin that cause pain.
Another common mechanism is the lack of support the sandal provides. This can cause repetitive injury to the muscle or bones of the foot. Sandals also often do not have adequate arch support. Because of this, it is possible to develop inflammation of the foot. This is normally on the bottom or heel of the foot and known as plantar fasciitis.
Open toe sandals also allow for more outside materials to contact the skin. Fungal or bacterial infections are possible, as are insect or animal bites.
Sandals could contribute to your pain. I would recommend trialing no sandals for a few weeks and seeing your doctor if symptoms continue or worsen.