Can a π bond form between the py and d(x2-y2) orbitals along the x-axis?
Perhaps you may (or may not) be familiar with a quantity known as the overlap integral, defined as: 
$$ S_{AB}= \int_{\text{all space}} \psi_A(r)^*\psi_B(r) d^3r$$ 

for 2 atoms, A and B.

In simple terms, it is the amount of "overlap" of 2 orbitals of an atom. Its value ranges between $0$ and $1$, implying no overlap and complete overlap respectively.

Now, to see if two orbitals overlap, in your case $\ce{p_y}$ and $\ce{d_{x^2-y^2}}$, one simply needs to compute the quantity defined above. Now, of course this would be very difficult if you don't know the functional form of the two orbitals, and even if you did know the functional form, evaluating the integral would still be messy. 

So we perform some mathematically chicanery. If you are familiar with "even" and "odd" functions. An even function times an odd function is odd, and the product of two odd functions is even. 

The orbital $p_y$ is odd as it changes sign if $y \rightarrow -y$. However, $\ce{d_{x^2-y^2}}$ doesn't change signs under the same transformation and thus is even. This is evident if you look at the shape/diagram of the orbital.

Thus their product is an odd function, and when evaluating the integral of an odd function over a symmetric interval (and doing so over all space is necessarily a symmetric interval because 3D space is isometric) is necessarily zero. 

Simple proof of this mathematical fact is given below: 

Consider an integral of the form (this is the same form as the 3D integral given in the first line, wherein your boudns are $-\infty$ and $+\infty$ for each of the three directions $x,y,z$

$$I=\int_{-a}^a f(x)\,\mathrm{d}x$$
$$I=\int_{-a}^a f(x)\,\mathrm{d}x$$
If $\,f$ is odd or even, then sometimes you can make this simpler. We can rewrite that integral in the following way:
\begin{align*}
I=\int_{-a}^a f(x)\,\mathrm{d}x
&amp;= \int_{-a}^0 f(x)\,\mathrm{d}x + \int_0^a f(x)\,\mathrm{d}x \\
&amp;= \int_0^a f(-x)\,\mathrm{d}x + \int_0^a f(x)\,\mathrm{d}x
\end{align*}

For an odd function, we have $f(-x)=-f(x)$, whence
$$I = \int_0^a (-f(x)+f(x))\,\mathrm{d}x = 0$$