Free of powers polynomials are called multilinear in the literature.
For sets $A\subseteq \{1,\dots,n\}$, write $c_A$ for the coefficient of $\prod_{i\in A}x_i$ in the multilinear polynomial $P$. There is the tautological necessary and sufficient condition for $P$ to be 0-1-valued on $\{0,1\}^n$:
$$\sum_{B\subseteq A} c_B\in\{0,1\}\text{ for all $A\subseteq\{1,\dots,n\}$}.$$
A different necessary and sufficient condition
By comparing coefficients in the equation $P=P^2$, we get
$$c_A = \sum_{\substack{B,C\subseteq\{1,\dots,n\}\\B\cup C=A}}c_{B}c_{C}\text{ for all $A\subseteq\{1,\dots,n\}.$}$$
Note that we need to collect the coefficients of monomials in $P^2$ even if they have powers of $2$, i.e. $B$ and $C$ overlap.
A necessary condition
By the inclusion-exclusion principle, we can write any of the $2^{2^n}$ possible functions $f:\{0,1\}^n\to\{0,1\}$ as a polynomial with
$$c_A=\sum_{B\subseteq A}(-1)^{|A\setminus B|}P(1_B)$$
where $1_B\in\{0,1\}^n$ denotes the vector with
$$(1_B)_i=\begin{cases}1&\text{ if $i\in B$}\\
0&\text{ otherwise.}\end{cases}$$
This implies the necessary condition that $|c_A|\leq 2^{|A|-1}$ for $|A|\geq 1$. This worst case is acheived by "parity functions" where $f(x_1,\dots,x_n)$ is $1$ if and only if $x_1+\dots+x_n\cong i$ mod $2$, for some fixed $i\in\{0,1\}$.
Affine polynomials
The question also asks about polynomials with no terms of total degree two or more, usually called affine functions:
$$P(x_1,\dots,x_n)=a_1x_1+\dots+a_nx_n+b.$$
There are $2(n+1)$ such polynomials that are $\{0,1\}$-valued on $\{0,1\}^n$, and they are $0$, $1$, $x_i$, and $1-x_i$ for each $1\leq i\leq n$.
To show this, first consider the linear case ($b=0$). Then $a_i=P(1_{\{i\}})\in\{0,1\}$ for each $1\leq i\leq n$, so if $a_i$ is non-zero then $a_i=1$. If $i,j$ are distinct with $a_i$ and $a_j$ non-zero then $1+1=a_i+a_j=P(1_{\{i,j\}})\in\{0,1\},$ a contradiction. So $P$ is either the zero polynomial or a single monomial $x_i$.
For general affine $P$, we have $P(0,\dots,0)=b\in\{0,1\}$ so the remaining case is $b=1$, and the same argument applied to $1-P$ shows that either $1-P=0$ (giving $P=1$) or $1-P=x_i$ for some $i$ (giving $P=1-x_i$).