Yes, air guns can be very useful in training pistol shooting. Same reason .22 is a good caliber for training, the round is so small that you notice mistakes you make (wrong grip, uneven trigger pull, etc) easier than with a heavy recoil gun. All of which translates back into real gun shooting, regardless of caliber.
I have an old Walther CP3 CO2-driven air gun I use for target pratice inside my flat, at about 8 meters (the widest part of my place, I stand in the kitchen and shoot at a target in a bookcase inside my bedroom, hehe). It shoots a .177 pellet round.