At the time of Fantine's decision, remember, she is a single mother without a husband in a time when this was socially inappropriate. She was also poor and without means of a direct income. In her mind, though her child was her priority, she did not believe she could provide for Cosette at the same time as taking care of her. Who would hire a single woman bound by the responsibility of a very young child?
She first saw Mm. Thenardier with her two daughters playing nearby whom Fantine described as "pretty." They were in a rare moment of utter happiness at the make-shift swing their mother had discovered for them, and from a distance, it was if Fantine was beholding angels. Pretty likely meant that they looked well taken care of. In her desperation, Fantine did not have time to do any sort of background check on this woman and her husband. All she knew was that they were married, had two daughters (about Cosette's age), and they ran a small inn.
They of course seem very kind-hearted and deceive Fantine into further believing in the goodness she had already bestowed on them without reason. Heartbroken and hopeless, she is in a hurry to start a life which will be able to sustain the financial support of herself and her child, and in ignorance and lack of experience, the Thenardiers seem like a God send. She certainly believes she will find stability rather quickly and assumes she will be coming back for Cosette very soon.