Actually, not. They generally are, but it is not required.
from http://www.uscourts.gov/faq.html:
Q: What are the qualifications for becoming a federal judge?
The Constitution sets forth no specific requirements. However, members of Congress, who typically recommend potential nominees, and the Department of Justice, which reviews nominees' qualifications, have developed their own informal criteria.
Or from the Federal Judicial Center
What are the qualifications for becoming a federal judge?
Although there are almost no formal qualifications for federal judges, there are some strong informal ones. For example, while magistrate judges and bankruptcy judges are required by statute to be lawyers, there is no statutory requirement that district judges, circuit judges, or Supreme Court justices be lawyers. But it would be unheard-of for a president to nominate someone who is not a lawyer. Before their appointment, most judges were private attorneys, but many were judges in state courts or other federal courts. Some were government attorneys and a few were law professors.
Do you know any senior federal judge who isn’t a lawyer?