Yes. Refusing to keep the legendary you caught will allow you to encounter it again. People often shiny hunt legendaries this way, but you can only see if it's shiny after you catch it, in the screen where you select which Pokemon you want to keep.
Source: Experience
Hope I helped!