It is a federal crime to steal mail from a mailbox.
It is not illegal to take a picture of someone's house provided that you take the piciture from a place you have the legal right to be (e.g. a public sidewalk or street). What you do with the picture might be illegal, more details about the use would be needed to know that.
Whether "dumpster diving" is a crime depends on the applicable state law and perhaps the details of trash dumpster at issue. Quite often, though, it is a crime of theft.