Not exactly.
First, you must register your copyrighted work in order to sue for copyright infringement. This is a requirement. You can, however, wait for your work to be infringed before you register your work. You never have to register your work, unless you want to sue for infringement.
If you publish your copyrighted work, however, and do not register this work within three months of its publication, then you are limited in the types of damages you can collect should your work be infringed. Registration prior to infringement or within three months after publication (even if during this three-month period your work is infringed), you will be entitled to collect statutory damages and attorney fees. Statutory damages are from between $750 to $30,000 per infringed work (or as much as $150,000 per infringed work for especially egregious, willful infringement).
If you do not register your work within this three month period after first publication, then you can still sue for infringement after registering your work, but you will be limited to collecting only the actual damages that can be demonstrated (the demonstrated profits realized by your infringer or the demonstrated losses you have suffered as a result of the infringement).
Because actual damages may be difficult to prove, or the actual damages may be nominal or nonexistent, a copyright infringement suit filed against your infringer may not make financial sense to pursue - you would be spending more to sue than you could hope to collect. An award of statutory damages (those damages set by law), along with your attorney costs, makes an infringement suit a reasonable action to pursue.
That is one reason why registering your work prior to, or within three months of, publication is wise. Another reason why registration is wise is registration provides you with the presumption of ownership in the work. For a relatively small registration fee, you have important protection for your copyright work.