My MacBook Air is automatically connecting to a password protected network that's not mine!
Wi-Fi passwords are synchronized via iCloud keychain. That's why your iPhone also knows the password. Try deleting this network from Preferred Networks.

Also delete item from your keychain.
In Keychain Access.app select iCloud keychain, find the item with the SSID (network name) of your neighbor's network and remove it (Right click -> Remove).