understanding programming monads through diagrams
I think the nLab definition is too abstract and is confusing you more than anything. Perhaps you should start from Wikipedia?  Anyway, here are some comments.


  For the case of programming languages, what are the objects (0-cells), morphisms (1-cells) and 2-morphisms (2-cells)?


In the case of programming languages (and in most usual cases) the bicategory in question is $\mathbf{Cat}$, the 2-category whose 0-cells are categories, 1-cells functors and 2-cells natural transformations.

Spelling out the nLab definition, the object is a category, the endomorphism is an endofunctor and multiplication and unit are natural transformations.

A typed functional programming language usually induces a category as follows: the objects of the category are types; a morphism $A\rightarrow B$ is an expression (i.e., a program) of type B containing a parameter of typa A, modulo evaluation.  I am not overly familiar with Haskell but I believe that people call the induced category $\mathbf{Hask}$, so a Haskell monad is nothing but an endofunctor (with suitable natural transformations) of $\mathbf{Hask}$.  If I am not mistaken, in that context the unit is called "return", whereas multiplication is called "bind", i.e., the &gt;&gt;= operator (the category-theorist's definition of multiplication $\mu$ may be easily recovered from &gt;&gt;=, and vice versa).


  Are the endomorphism the lines of code preserving the type a?


No.  As I said above, the endomorphisms are endofunctors. For Haskell, the object a is not a type but the category $\mathbf{Hask}$.


  Then, can a computer program be represented in terms of these diagrams?


The answer is actually yes, but not through the connection you are describing. In fact, the string diagrams you mentioned live in the 2-category $\mathbf{Cat}$, whereas programs live in the category induced by the programming language.  A little more on this topic may be found in the answers to this cstheory.SE question.