Dear Harry,
Solar flares can occur at any time, including during solar or lunar eclipses, but if we are observing a solar eclipse from here on Earth, we will not see the flare occuring since the Moon is blocking the solar disk (where the flare would occur). We only see the relatively faint corona (the outermost part of the solar atmosphere) during a solar eclipse, and this is not where flares occur (they occur closer to the surface). We also will not see a flare occurring during a lunar eclipse because when we see a lunar eclipse, we are on the night side of the Earth, and therefore do not see the Sun. However, if we are observing from space or from an observatory on the day side of the Earth during a lunar eclipse and a flare occurs, we would be able to see it.
Hope this makes sense!
Holly