How/when will I know if my conference paper will be selected for a special issue? My paper was published at a good conference (in the field of theoretical computer science). The proceedings mention that some papers will be selected for publication in a special issue of journals X and Y.

How will I know if my paper is one of them? If it is not, I would simply submit it to some other journal later on. In general, will the conference organizers let me know of a timeline? Basically, I wonder if I should just wait for (say) a few months, and if I hear nothing, then assume my paper was not selected.
If you haven't received an invitation a month after the conference, it's safe to assume that your paper won't be invited to the special issue.

Special-issue papers for theoretical computer science conferences are normally selected by the program committee chair (or a small subcommittee), based on nominations and discussion from the program committee.  The two natural times to solicit those nominations are (1) at the end of the review cycle, months before the conference, when all the papers and reviews are fresh in the PC members' minds, and (2) immediately after the conference, when all the talks are fresh in everyone's minds, and the PC chair's work is otherwise finished.

Once the PC chair selects the papers, there's not much else to do.  Under normal circumstances, the guest editors (usually the PC chair, but sometimes other members of the PC) email invitations to the selected authors shortly after the conference.  Occasionally the invitations go out even before the conference, but that's rare.

That said, sometimes additional papers are invited later, especially if some invited authors decline, and some PC chairs are just less organized than others.
If you have good reason to believe that the PC thought your paper was especially strong (for example, unanimously strongly positive reviews, or PC members telling you at the conference how much they liked your paper), it can't hurt to send a polite note to the PC chair or a close colleague on the PC asking whether the special issue papers have been selected.  (Asking whether your paper will be invited is a bit presumptuous.  Just don't.)