Some washing machines allow hot water to enter only during certain cycles. Others intermittently allow hot and cold to enter, to temper the temperature of the water. Consult your owner's manual if you are unsure about whether the machine is acting abnormally.
If you're sure the machine isn't working the way it used to--or should--try these tests:
Is the hot water turned on? If not, turn it on.
Is the washer getting cold water but no hot water? If so, check to see if the control panel settings are correct.
Is there hot water coming through the proper hose? If not, check to see if the screen inside the water-inlet valve is clean. (The water-inlet valve is the device on the washing machine that the fill hoses are attached to.) If it's clean, you probably have a defective water-inlet valve. If so, completely replace it.