‘At a bank’ suggests simply the place of work and it also therefore indicates the type of employment. Similarly ‘at school’ suggests studying or being a student. ‘In a bank’ describes the actual location/place. ‘In school’ again refers to the place where the child/student is.
My English teachers always told me that I should use “at” when I use such sentences because my aim is not to specify that person works inside the bank, rather I simply want to say he works for a bank. However, I sometimes see some people using “in” for such sentences. So lets see what the teachers say…