I replaced an outlet and the tester says open ground. I checked all the wires and they are secure including the ground wire. What could be wrong?
Assuming you didn't reverse the hot/neutral, which should be detected on a standard receptacle tester, it's either a bad receptacle, bad wiring, bad connection between the wiring and the outlet, or a bad tester.
If it's a new receptacle, odds are low that it's bad. Test for continuity from the ground screw to the ground pin inside the receptacle (with the power turned off).
If it's a bad connection, you can do the same test as above, but from the ground wire instead of the receptacle ground screw.
If it's bad wiring, then with the breaker turned on, and with extreme care not to electrocute yourself, a contact tester will not show current between the hot and ground wires.
If none of these tests show a problem, it could be a bad tester, and may be worth checking it in other receptacles or getting a replacement.
Testing the ground here would be a good way to rule it out. Put one end of a voltage tester to the hot (black), and the other one to the ground, the same pigtail that connects to the ground on the receptacle. You should read the voltage of the hot (between 110 and 120 volts depending on your area).
Alternately, a continuity tester between ground and neutral in residential settings can tell you if the ground is actually connected to anything, but it's best to test under the small load that the tester creates as sometimes loose connections only show under load. That's why I like the solenoid type voltage testers - in addition to the great tactile feedback, they also create enough of a load to cause many problems to show.
As BMitch said, you probably just got hold of a bad receptacle.
When a test says your ground is open, there's a good chance it is. Just because the wire is secure on the outlet doesn't mean its not open. Check continuity between this outlet's ground, and another ground reference.
And suspect that the ground might not be connected somewhere else. Check the main breaker panel, and any junction boxes between it and your outlet.