Yes, he/she is allowed to legally remain in the US while the H1B petition is pending. But he/she cannot work after OPT expires if H1B is not yet approved. Better to go for premium processing (pay $1000), get H1B sooner, and work than to sit at home. Generally even a weeks salary would compensate the $1000.