This depends. Some birds lay eggs, because they're pretty much "genetically coded" to do so, if this is the case there isn't much you can do. Other times the environment stimulates the bird to feel like it needs to lay. Do you have a nesting box/nest/material? Remove it if so, and when it lays any eggs.