An airgun is legally justifiable; it's non-lethal, so PETA and the ASPCA would have trouble making a case against you. The neighbors could concievably file complaint with the police if they see you and think its a real gun, however.
A real firearm, however, would not be legal. Just discharging a firearm in a residential area is a crime, usually filed under "Unlawful Discharge of a Firearm." You could also accrue charges of Disturbing the Peace, Criminal Mischief, and God knows what else.