I am reading Shankar's Quantum Mechanics and I am looking at the case where there is one particle inside a box, where the potential is zero inside the wall and abruptly goes to infinity outside the wall. I like the technique of differential equations used and I am wondering if we suppose there is a particle in $n$-dimensional space, then we can still use the technique used in calculating wavefunction and energy in say a 2-dimensional and 3-dimensional box.
Yes, for infinite potential wells in any number of dimensions, the same technique can be applied. Each confinement direction gives an extra quantum number, and the wavefunction is just the product of the 1D wavefunction for each direction.
More problematic is the finite potential well, because one can't use a simple expression for the potential in more than 1 dimension, making the equations very hard to solve.