The Constitution provides that you should be free from unreasonable searches and seizures. And normally a warrant would be required to search your home. There are however exceptions to the warrant requirement such as consent, emergency, search incident to arrest, and items in plain view. Officers may also make a protective sweep of an area if they believe accomplices may be present.
If you did not give consent, perhaps the officers had sufficient information to obtain a warrant to search your home. Were you shown a copy of a warrant? If not, you may have the ability to motion the court to suppress the evidence gathered during the warrantless/unconstitutional search.