Art is something done with the express purpose of aesthetic appreciation, eliciting emotional responses and so on.
Nature for example can be beautiful, and certainly can draw out emotional responses from people. But unless we bring religion into the mix, it is not made with any purpose, it simply is.
The closest thing I think of programming as art is obviously videogames, if I consider that game mechanics are added with the undeniable purpose of inspiring in the player emotional response, it can certainly be done with aesthetics in mind, and I can think of a few examples where it is used to question norms.