Let's assume we're solving a $2D$ Laplace problem, in a domain (if necessary simply connected) $\Omega \subset \mathbb{R}^2$, with a Dirichlet boundary $\Gamma_D$ and a Neumann boundary $\Gamma_N$:
$$\Delta \mathbf{u} = 0.$$ $$\mathbf{u} = \mathbf{u_D}, \quad \text{ on }\Gamma_D$$ $$\nabla\mathbf{u}\cdot \mathbf{n} = \mathbf{u_N}, \quad \text{ on }\Gamma_N$$
We define a stream function $\Psi$ such that it satisfies $$\frac{\partial \Psi}{\partial x} = \frac{\partial \mathbf{u}}{\partial y}, \quad \frac{\partial \Psi}{\partial y} = -\frac{\partial \mathbf{u}}{\partial x}.$$
One can now argue that level sets of $\Psi$ correspond to the streamlines of $\nabla \mathbf{u}$ since $$\nabla\mathbf{u} \cdot \nabla\Psi = 0.$$
Presumably, since $\mathbf{u}$ satisfies the Laplace equation, $\nabla \mathbf{u}$ satisfies the continuity equation $\nabla \cdot (\nabla\mathbf{u}) = 0$, so the stream function exists (here the assumption of a simply connected $\Omega$ should be necessary).
Moreover, $\Psi$ now satisfies the Laplace equation itself. This approach seems very useful for visualizing the streamlines using $\Psi$, but I am unsure how to go about actually finding it. We have a new Laplace equation, but no boundary conditions. The examples I've found online usually only cover extremely specific situations such as a zero Dirichlet boundary condition on a unit square, but nothing general. It doesn't seem to me like it's even possible to formulate the Dirichlet boundary conditions uniquely if $\mathbf{u_D}(x,y)$ is a non-constant function.
You can always just integrate the conditions for $\Psi$. Fix some $(x_0,y_0)\in\Omega$ and let's examine the function $$\Psi(x,y):=\int_{x_0}^x\partial_yu(s,y)\,ds-\int_{y_0}^y\partial_x u(x_0,s)\,ds.$$ Then $$\partial_x\Psi(x,y)=\partial_yu(x,y)$$ and, using the div-free property of $\nabla u$, also $$\partial_y\Psi(x,y)=\int_{x_0}^x\partial^2_{yy}u(s,y)\,ds-\partial_x u(x_0,y)=-\int_{x_0}^x\partial_{xx}^2u(s,y)\,ds-\partial_x u(x_0,y)=-\partial_xu(x,y).$$
I doubt that one is able to say something useful about Dirichlet boundary conditions for $\Psi$ (note that it is defined only up to an additive constant).