If customers are on Twitter, then tweeting can be a channel for customer acquisition, as long as it's not at the expense of more effective marketing channels.
It is the same with open-source. If open-source code is part of the product or customer acquisition then it makes sense. For example, a paid analytics service may provide an open-source self-hosted version which acts as a customer acquisition channel for the hosted, paid version.
There is a community of "makers" who spend seemingly all day every day tweeting about what they're doing. I think most of them are distracting themselves from the real work of building a business. And I think the rest are selling courses and tools to "makers" using Twitter as their customer acquisition channel (dvassallo, shl, etc.). A small minority built successful businesses, then spend their days Tweeting (levelsio, dhh, etc.).