The Familiar either has no alignment, or has an alignment chosen by the caster of the spell.
In each case the spell describes, the spirit's variable characteristics are chosen by the caster:
You gain the service of a familiar, a spirit that takes an animal form you choose... the familiar has the statistics of the chosen form, though it is a celestial, fey, or fiend (your choice)...
and the spirit is unfailingly loyal to the caster:
Your familiar acts independently of you, but it always obeys your commands.
The implication appears to be that the spellcaster has absolute determination of both their familiar's actions and its very nature -- which is to say, control of its alignment, at least for creatures which have an alignment (like the Imp).
However, the Alignment entry from the Monster Manual reads,
Many creatures of low intelligence have no comprehension of law or chaos, good or evil. They don’t make moral or ethical choices, but rather act on instinct. These creatures are unaligned, which means they don’t have an alignment.
Since beast-form familiars copy the statistics of the basic creature, and those creatures have low intelligence, they would fall under the guideline of "having no comprehension."