Can I wear contact lenses after scleral buckle surgery, or do I have to wait?

Eventually, you can. Excellent question. Generally after a scleral buckle the conjunctiva or thin layer of skin around the eye needs time to heal. It is common to have a few very fine stitches that are on the surface. Wearing a contact lens increases the risk for infection like any foreign body. It also may be difficult to do while drops are being used frequently. Best to wait till your retina doc feels it's ok.
Wait. Scleral buckle surgery requires cutting through the conjunctiva or skin of the eye to expose the eye muscles, under which the buckle is placed. You'll need to wait for this to heal for several week before you could tolerate a contact lens. Also, buckle surgery will likely change your prescription, so you'll need a new refraction afterwards.