A numerical study of flow across a row of transversely oscillating square cylinders (of diameter d) has been undertaken using the lattice Boltzmann method, for a better understanding of fluid–structure interaction problems. The effects of cylinder oscillation frequency ratio (fe/fo, where fe is the cylinder oscillation frequency and fo is the corresponding vortex shedding frequency for stationary row of cylinders), amplitude ratio (A/d), non-dimensional spacing between the cylinders (s/d) and Reynolds number (Re) on ensuing flow regimes and flow parameters have been studied to understand the flow physics. Six different flow regimes observed in this study are the quasi-periodic non-lock-on-I, synchronous lock-on, quasi-periodic lock-on, quasi-periodic non-lock-on-II, synchronous non-lock-on and chaotic non-lock-on. It is observed that the range of the lock-on regime depends upon the relative dominance of incoming flow and cylinder motion. Although the lock-on regime in the case of Re = 80, s/d = 4 and A/d = 0.2 is substantially larger as compared to that for a single oscillating cylinder, the range of the lock-on regime shrinks with a reduction in the cylinder spacing, increase in the Reynolds number or decrease in the oscillation amplitude. It is also observed that the wake interaction behind the cylinders weakens with an increase in fe/fo, Re, A/d or s/d, leading to the formation of independent wakes and synchronous nature of the flow. For fe/fo ≥ 1.2, independent and intact oscillating wakes are noted and an additional frequency (wake oscillation frequency) is obtained in the time series of the lift coefficient. Although it was expected that the complexity in the wake interaction would increase with cylinder oscillation or amplitude ratio, an opposite effect (that is, formation of independent wakes) is noted from the results.