It's hard to say as there are so many variables -- with the biggest being the size of the airport at which you're connecting. (Pull up a map and take a look -- are there multiple terminals? Will you have to take a tram to get from one to the other? Will you be able to make the connection without having to go back through a security line?) If you're flying the same airline for both legs, it's less of an issue, as they'll often have gates near one another in the same terminal (plus if you book direct on the airline's own website, it will typically weed out flights with a connection the airline considers too close for comfort). Again, this (airlines and their typical gate/terminal locations) is information you can usually find on the airport's website. If you're flying multiple airlines, it's always best to err on the side of caution: you don't want a slight delay on your first leg (the chances for which increase as the day goes on) to cause you to miss the second.
For example, if I'm connecting at JFK from an early morning flight on JetBlue (which flies exclusively out of one terminal at JFK, and morning flights are typically on time), I'd be comfortable with a layover of 45 minutes. If I have to change terminals at JFK due to booking with different airlines (e.g., Delta to American) -- which means leaving the terminal, taking the AirTrain to another terminal and going back through security -- I wouldn't want a layover any less than 90 minutes, with 2 hours being even better (and I don't check any luggage -- if you're changing flights between airlines and will have to pick up your checked luggage, haul it somewhere else and re-check it for your next flight, add an additional hour for that....) Moral of the story: unless you're saving a ton of money by doing so, don't fly two different airlines if you can possibly help it... if you're flying the same one, your luggage will be transferred, they'll at least try to help you if a delay in your first flight creates an issue with your connection, and your connecting flight is less likely to be at the other end of a giant airport...