Under what condition the following statement is true?
$$ \int_{0}^{1} p(i,t)di =\lambda(t) \int_{0}^{1} y(i,t)di \Rightarrow p(i,t) = \lambda(t) y(i,t) \forall i\in[0,1] $$
My guess was that I need to assume that:
$$ \int_{0}^{x} p(i,t)di =\lambda(t) \int_{0}^{x} y(i,t)di \quad \forall x\in[0,1] $$ and of course that they are continuos in the interval. Is it enough?
Yes, it is enough. If we take your assumption and differentiate with respect to $x$, we get $$ p(x,t)=\lambda(t)y(x,t). $$ Therefore if you fix any $t$ and assume your assumption for all $i\in[0,1]$, then the conclusion holds for that $t$ and all $i\in[0,1]$. It also works for all $t$, but it is strong enough to work one value of $t$ at a time.
I assumed that $p$ and $y$ are continuous with respect to the first argument. What you assumed is equivalent with what you want. Integrating the claim gives the assumption and differentiation goes the other way.