Technically, it's not the case that women were not allowed to act during Shakespeare's time. There was no law about it, and women did act in private performances throughout the English Renaissance. It was simply not considered appropriate for a woman to be a paid actress, because acting was considered a low class profession, even an immoral one by some people. Actors are paid to be looked at, and a woman putting herself forth to be looked at for money would be comparable to prostitution, as the previous answer says. So it was considered socially unacceptable, and therefore, women did not act on the public stage. It is an oversimplification and inaccurate, however, to say that women were not "allowed" to act in Shakespeare's time.