Is there a Spanish (Castilian) idiom equivalent to the phrase "being in the wrong place at the wrong time?" Or is simply "en el lugar equivocado en el momento equivocado" commonly used?
I once heard an old saying (it's not an idiom) "Cada cosa en su tiempo, y los nabos en adviento" I think it means that things out of proportion (in time and place) lose the merit and value; everything should be timely and appropriate like a farmer who plant seeds of turnip... or something like that, but anyway is most commonly used "En el lugar equivocado en el momento equivocado"
It does not exist as an idiom, set phrase or fixed expression in Spanish. Since it is a rather common idea you'll see it in many variations
(estar) "en el lugar equivocado en el momento incorrecto"
"en el sitio y el momento errado",
Of course, there are other understandable ways to express it. When in need of referring about someone who was in the wrong place at the wrong time, you might also say that he (or she) was:
"donde no debía cuando no convenía"