One way to place a node (or any arbitrary TikZ code) at every point is to use the show path construction decoration from the decorations.pathreplacing library. Here's a style node at every point that takes a node option as an argument and places a nodes with the provided option at every point on a path:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing}
\begin{document}
\begin{tikzpicture}[
mnode/.style={circle,draw=black,fill=black,inner sep=0pt,minimum size=2pt},
node at every point/.style={
decoration={
show path construction,
moveto code={\node at (\tikzinputsegmentfirst) [#1] {};},
lineto code={\node at (\tikzinputsegmentlast) [#1] {};},
curveto code={\node at (\tikzinputsegmentlast) [#1] {};}
},
postaction=decorate
}
]
\draw [node at every point=mnode] (0,0) -- (1,1) -- (2,2) -- (3,2) -- (4,5);
\end{tikzpicture}
\end{document}

Or you could use a \foreach loop for this:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[mnode/.style={circle,draw=black,fill=black,inner sep=0pt,minimum size=2pt}]
\draw (0,0) node[mnode]{}
\foreach \x/\y in {1/1,2/2,3/2,4/5}{
-- (\x,\y) node[mnode]{}
};
\end{tikzpicture}
\end{document}
1/1,2/2,3/2,4/5and if you want to draw it without the nodes just use\draw (0,0) \foreach \x/\y in {1/1,2/2,3/2,4/5}{ -- (\x,\y)};– Jake Feb 17 '12 at 16:16