This problem can be caused by a number of problems. If your piping is galvanized, you may have calcium in your piping on the hot side, since the hot side clogs up first. The water heater could have a bad dip tube which allows the cold water to mix with the hot at the top of the water heater, instead of being directed to the bottom of the water heater. The faucet could be a single handle pressure balanced faucet, that has a bad cartridge. If the cartridge is bad, it will not adjust and allow the hot to come on. You could have a temperature control shower valve, that has the limit adjustment set too low. This would keep the setting on the hot side below the cold flow setting. Just a few ideas. It will take some diagnostics and some answers to the type of questions David is asking to get to the bottom of it.