Is MacBook Air 2017 used for programming viz Java or Python and also for Web development?
To answer your question about the Air: Yes.  

You may want to consider broader options as well. For MacBooks in general, the biggest advantage to doing development on a them is that you get XCode and the best possible experience when developing iPhone/iPad apps and Mac apps. 

However in your case, it seems you're not doing mobile development, and price and/or weight are a concern since you're considering a MacBook Air.

if you're open to windows, take a look at something like the HP x360 which is well reviewed and has advantages over the MacBook air:


MBA is limited to 8 GB of RAM, while the HP allows 16 GB. This can be significant for software development.
MBA only supports old style USB 3. The HP supports USB type C 3 .1 that can charge the laptop or drive an external monitor.
HP has a watch band hinge that allows folding the screen back to be like the tablet. Not a big use case but actually helpful sometimes.
MBA resolution is 1440x900, while the HP resolution is full HD 1080p.


Price and battery life are very similar between the two in a 256GB/8GB configuration.

Of course, Apple consistently has the best support and ability to use their stores.

If you have a hard requirement to stay on the Apple platform, I would suggest reconsidering the MacBook Pro 13. In general it's better suited to be a development machine, and it's really not that heavy to carry around.