nonsingularity assumption in Lemma V.1.3 in Hartshorne Lemma V.1.3 in Hartshorne states that if $C$ is an irreducible nonsingular curve on a surface $X$, and $D$ any curve meeting transversally with $C$, then $\#(C \cap D) = \deg_C (\mathscr{L}(D) \otimes \mathcal{O}_C)$. The proof is based on tensoring the short exact sequence $0 \rightarrow \mathscr{L}(-D) \rightarrow \mathcal{O}_X \rightarrow \mathcal{O}_D \rightarrow 0$ with $\mathcal{O}_C$ to obtain the short exact sequence $0 \rightarrow \mathscr{L}(-D)\otimes \mathcal{O}_C \rightarrow \mathcal{O}_C \rightarrow \mathcal{O}_{C \cap D} \rightarrow 0$. The exactness on the left of the second sequence follows from the transversality assumption. With this, one identifies $\mathscr{L}(D) \otimes \mathcal{O}_C$ with the invertible sheaf on $C$ associated to the divisor $C \cap D$. Since the intersection has been assumed transversal, one concludes that the degree of the divisor $C \cap D$ must be equal to $\#(C \cap D)$.
My question is: where does the assumption on the nonsingularity of $C$ come into play? And one more question: If two curves $C, D$, not necessarily nonsingular, meet transversally at a finite number of points, is their intersection number not always equal to $\#(C \cap D)$? Why when defining the intersection number of curves meeting transversally it is required that the curves are nonsingular? (e.g., as in the discussion above Theorem V.1.1 at page 357)
 A: The assumption comes in to play in dealing with the degree of $\mathcal{L}(D)\otimes\mathcal{O}_C$. Hartshorne has only rigorously developed material on degree for divisors on nonsingular curves so far, and there's no available method for computing degree on a singular curve.
As for your "one more question", this is actually addressed in proposition V.1.4:

If $C$ and $D$ are curves on $X$ having no common irreducible component, then $$C.D = \sum_{P\in C\cap D} (C.D)_P.$$

(Where $(C.D)_P$ is the length of $\mathcal{O}_{X,P}/(f,g)$ for $f,g$ local equations of the divisors $C,D$ respectively at $P$.) If $C$ and $D$ meet transversely at $P$, then the intersection multiplicity is 1 at each point and you recover the result you're after. Note that there are no assumptions on $C$ and $D$ besides being effective divisors - they may be singular, reducible, etc.
I do not read the material above theorem V.1.1 as requiring that $C$ and $D$ always be nonsingular curves meeting transversely, just that this is where one wants to start with the theory: we need whatever method we come up to give the right answer in this case, so we'll develop something which works in this case and see how far we can extend it.
