a.o.smith water heater
First things first, Give us a chance to answer. This is a forum staffed by volunteers who do this for free. Most of us have full time jobs so it sometimes takes us a while to get to these messages. By the way, now that you are a member you are also one of us volunteers.
As for your water heater, I will guess, since you indicated that it "won't light" that it is a gas fired unit.
Is the gas on?
Is the pilot light lit?
Was anything done to it prior to this problem?
How old is it?
Could be a bad Thermocouple.
could be a bad gas valve