Yes you can. If you wish to stay in Thailand based on being married to a Thai national you must basically:
1 Have been married in Thailand, or have your overseas marriage registered in Thailand.
2 Have
*****
0 baht in a Thai bank account in your name, or have an income of
*****
baht per month.
3 Apply for a 90 day non O Visa.
4 Apply for a 12 month extension of stay (indefinitely as long as you satisfy the requirements).
There's more to each of these steps, check at your local immigration office for details.
Good luck.