Yes, text advertising is legal if you comply with the laws and regulations. For example, Telephone Consumer Protection Act (TCPA) requires you to get written consent from customers before sending promotional messages. The CAN-SPAM Act requires you to avoid sending unwanted messages (Spam), and provide ways for customers to opt-out easily.
Learn about your local text marketing laws and make sure you comply.