(For my original answer, see the end of the post.)
This answer gives a combinatorial argument for both identities, using the hints above. It leans heavily on ideas from Section 12 in these notes.
First, if $X = \{1, 2, \ldots, n\}$, we know that there are $n^n$ functions $\alpha:X \to X$.
First identity: Any function $\alpha: X \to X$ can be represented as a labeled, directed graph $G_\alpha$ with vertex set $X$, where $(i,j)$ is an edge in the graph if $\alpha(i) = j$. Suppose we start at some vertex $i \in G_\alpha$. Since $X$ is finite, and any vertex with $\alpha(j) = j$ has a self-loop, if we continue following directed edges in the graph -- from $i$ to $\alpha(i)$ to $\alpha(\alpha(i))$ and so forth -- we must eventually reach a vertex already visited. In other words, every sufficiently long directed path in $G_\alpha$ ends in a cycle. This means that each connected component of $G_\alpha$ consists of a set of trees attached to a cycle. (A tree may also consist of a single node.) Moreover, we can think of each tree as rooted by the vertex that is common to the tree and the cycle that it ends in. (See, for example, the picture at the bottom of page 4 here.) Since a set of disjoint cycles is just a permutation, the roots of the trees together with the edge set $(i,j)$ for each root $i$ form a permutation of the labels of the roots. Therefore, any function $\alpha: X \to X$ can be thought of as a permutation of the trees (via their roots) in a forest on the vertex set $\{1, 2, \ldots, n\}$.
All of this means that we can uniquely specify a function $\alpha: X \to X$ by
- Choosing a number of rooted trees and a multiset of sizes of those trees,
- Choosing a permutation of the multiset of tree sizes,
- Distributing the labels $1, 2, \ldots, n$ among the trees, and
- Choosing a labeled, rooted tree structure for each element in the multiset of tree sizes.
Steps 1 and 2 correspond to choosing a $k$ and $i_1, i_2, \ldots, i_k$ such that $i_1 + i_2 + \cdots + i_k = n$. For Step 3, we are distributing $n$ labels among sets of size $i_1, i_2, \ldots, i_k$, and thus Step 3 can be done in $\binom{n}{i_1, i_2, \ldots, i_k} = \frac{n}{i_1! i_2! \cdots i_k!}$ ways. For Step 4, Cayley's formula tells us that there are $n^{n-2}$ labeled trees with $n$ vertices. Since there are $n$ ways of selecting a root, there are $n^{n-1}$ rooted, labeled trees with $n$ vertices. Thus there are $i_1^{i_1-1} i_2^{i_2-1} \cdots i_k^{i_k-1}$ ways to perform Step 4. Putting all of this together yields
$$n^n=\sum\limits_{\substack{k,i_1,\ldots, i_k\ge1,\\ i_1+\cdots+i_k=n}}\frac{n!}{i_1!\cdots i_k!}i_1^{i_1-1}\cdots i_k^{i_k-1}.$$
Second identity: Break the connected components of $G_\alpha$ into two groups: 1) those that end in a cycle consisting of a single vertex, and 2) those that end in a cycle consisting of more than one vertex. For the first group, create a new, unlabeled vertex. Attach the root of each tree in the first group to the new, unlabeled vertex to create a single rooted tree in which all vertices except the root are labeled. Since the second group has no vertices for which $\alpha(i) = i$, it can be thought of as a function $\alpha':S \to S$, for $S \subset X$, such that $\alpha'(i) \neq i$ for any $i$. Thus we can uniquely specify a function $\alpha: X \to X$ by
- Choosing a subset $X-S$ of $X$ to comprise the elements in the first group,
- Choosing a rooted tree structure on $X-S$ in which all vertices except the root are labeled, and
- Choosing a function $\alpha':S \to S$ with no fixed points.
For a fixed size $k$ of $X - S$, there are $\binom{n}{k}$ ways to perform Step 1. A rooted tree with labels on all vertices except the root is equivalent to a completely labeled tree with no root, so there are, by Cayley's formula, $(k+1)^{k-1}$ ways to perform Step 2. Finally, there are $(n-k-1)^{n-k}$ functions from a set of size $n-k$ to itself that contain no fixed points. Putting all of this together yields
$$n^n =\sum\limits_{k=0}^n {n\choose k}(k+1)^{k-1}(n-k-1)^{n-k}.$$
Original answer:
The second equality follows from Abel's variation on the binomial theorem:
$$\sum_{k=0}^m \binom{m}{k} (w+m-k)^{m-k-1}(z+k)^k=w^{-1}(z+w+m)^m.$$
Let $m = n, w = 1, z = -1$ to get
$$\sum_{k=0}^n \binom{n}{k} (n-k+1)^{n-k-1}(k-1)^k=n^n.$$
Then, reindexing the sum via $k \to n-k$ yields the second identity
$$\sum_{k=0}^n \binom{n}{k} (k+1)^{k-1}(n-k-1)^{n-k}=n^n.$$
For a short proof of Abel's binomial theorem, see this recent paper by Chu. A generalization of it also appears as Equation 5.64 in Concrete Mathematics (2nd ed., p. 202).